#include #include #include #include #include #include #include "bits.h" void CoordBase_SetupMask (CCTK_ARGUMENTS) { DECLARE_CCTK_ARGUMENTS; DECLARE_CCTK_PARAMETERS; CCTK_INT nboundaryzones[2*cctk_dim]; CCTK_INT is_internal[2*cctk_dim]; CCTK_INT is_staggered[2*cctk_dim]; CCTK_INT shiftout[2*cctk_dim]; int bnd_points[2*cctk_dim]; /* points outside the domain */ int int_points[cctk_dim]; /* global interior points */ int gmin[cctk_dim], gmax[cctk_dim]; /* global domain extent */ int imin[cctk_dim], imax[cctk_dim]; /* domain extent */ int bmin[cctk_dim], bmax[cctk_dim]; /* boundary extent */ int ierr; int const reflevel = GetRefinementLevel(cctkGH); if (CCTK_IsFunctionAliased ("MultiPatch_GetBoundarySpecification")) { int const m = MultiPatch_GetMap (cctkGH); assert (m >= 0); ierr = MultiPatch_GetBoundarySpecification (m, 2*cctk_dim, nboundaryzones, is_internal, is_staggered, shiftout); } else { ierr = GetBoundarySpecification (2*cctk_dim, nboundaryzones, is_internal, is_staggered, shiftout); } if (ierr != 0) { CCTK_WARN (CCTK_WARN_ABORT, "Could not get boundary specification"); } /* Calculate the number of boundary points. This excludes points that are directly on the boundary. */ for (int d=0; d cctk_lsh[d]) { CCTK_WARN (CCTK_WARN_ABORT, "Illegal number of boundary points"); } /* Calculate the extent of the local part of the domain */ for (int dd=0; dd