[Commits] [svn:einsteintoolkit] SetMask_SphericalSurface/trunk/src/ (Rev. 118)

reisswig at tapir.caltech.edu reisswig at tapir.caltech.edu
Wed Apr 10 10:34:09 CDT 2013


User: reisswig
Date: 2013/04/10 10:34 AM

Modified:
 /trunk/src/
  SetMask.c

Log:
 Don't overwrite point from a previous sphere with "not excised".

File Changes:

Directory: /trunk/src/
======================

File [modified]: SetMask.c
Delta lines: +14 -4
===================================================================
--- trunk/src/SetMask.c	2012-11-05 16:05:35 UTC (rev 117)
+++ trunk/src/SetMask.c	2013-04-10 15:34:09 UTC (rev 118)
@@ -15,6 +15,20 @@
   if (!mask)
     CCTK_WARN(0, "No such variable, or no storage enabled");
 
+  /* Delete mask first!  */
+  #pragma omp parallel
+      {
+        LC_LOOP3(mask_zero, i,j,k, 0,0,0,
+                 cctk_lsh[0], cctk_lsh[1], cctk_lsh[2],
+                 cctk_lsh[0], cctk_lsh[1], cctk_lsh[2])
+        {
+          CCTK_INT i3D = CCTK_GFINDEX3D(cctkGH, i, j, k);
+          mask[i3D] = HYDRO_EXCISION_NORMAL;
+        }
+        LC_ENDLOOP3(mask_zero);
+      }
+
+  /* Now set excision! */
   for (int smi = 0; smi < 10; smi++)
   {
     CCTK_INT sfi = sf_IdFromName(SetMask_SurfaceIndex[smi], SetMask_SurfaceName[smi]);
@@ -35,10 +49,6 @@
           {
             mask[i3D] = HYDRO_EXCISION_EXCISED;
           }
-          else// if (SetMask_ResetAll)
-          {
-            mask[i3D] = HYDRO_EXCISION_NORMAL;
-          }
         }
         LC_ENDLOOP3(setsurface);
       }



More information about the Commits mailing list