aboutsummaryrefslogtreecommitdiff
path: root/src/FlatBoundary.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/FlatBoundary.c')
-rw-r--r--src/FlatBoundary.c28
1 files changed, 16 insertions, 12 deletions
diff --git a/src/FlatBoundary.c b/src/FlatBoundary.c
index 136785f..fcf3621 100644
--- a/src/FlatBoundary.c
+++ b/src/FlatBoundary.c
@@ -24,7 +24,6 @@
#include "cctk_Parameters.h"
#include "cctk_FortranString.h"
-#include "Symmetry.h"
#include "Boundary.h"
/* the rcs ID and its dummy function to use it */
@@ -925,7 +924,10 @@ static int ApplyBndFlat (const cGH *GH,
int var, vtypesize, gindex, gdim, timelvl;
int doBC[2*MAXDIM], dstag[MAXDIM], lsh[MAXDIM], lssh[MAXDIM];
CCTK_INT widths[2*MAXDIM];
- SymmetryGHex *sGHex;
+ CCTK_INT symtable;
+ CCTK_INT symbnd[2*MAXDIM];
+ CCTK_INT is_physical[2*MAXDIM];
+ CCTK_INT ierr;
/* get the group index of the variables */
@@ -983,25 +985,27 @@ static int ApplyBndFlat (const cGH *GH,
/* get the current timelevel */
timelvl = 0;
- /* see if we have a symmetry array */
- sGHex = (SymmetryGHex *) CCTK_GHExtension (GH, "Symmetry");
+ /* see if we have a physical boundary */
+ symtable = SymmetryTableHandleForGrid (GH);
+ if (symtable < 0) CCTK_WARN (0, "internal error");
+ ierr = Util_TableGetIntArray (symtable, 2 * gdim, symbnd, "symmetry_handle");
+ if (ierr != 2 * gdim) CCTK_WARN (0, "internal error");
+ for (i = 0; i < 2 * gdim; i++)
+ {
+ is_physical[i] = symbnd[i] < 0;
+ }
/* now loop over all variables */
for (var = first_var; var < first_var + num_vars; var++)
{
/* Apply condition if:
- + boundary is not a symmetry boundary (no symmetry or unset(=unsed))
+ boundary is a physical boundary
+ + boundary is an outer boundary
+ have enough grid points
*/
- memset (doBC, 1, sizeof (doBC));
- if (sGHex)
+ for (i = 0; i < 2 * gdim; i++)
{
- for (i = 0; i < 2 * gdim; i++)
- {
- doBC[i] = sGHex->GFSym[var][i] == GFSYM_NOSYM ||
- sGHex->GFSym[var][i] == GFSYM_UNSET;
- }
+ doBC[i] = is_physical[i];
}
for (i = 0; i < gdim; i++)
{