diff options
author | schnetter <schnetter@6a38eb6e-646e-4a02-a296-d141613ad6c4> | 2004-03-09 13:43:38 +0000 |
---|---|---|
committer | schnetter <schnetter@6a38eb6e-646e-4a02-a296-d141613ad6c4> | 2004-03-09 13:43:38 +0000 |
commit | 53c6439f7393ce244de3af416961cc4f63b0eacc (patch) | |
tree | 5ab8eb3cccd6c8280c864f6dbfbd23dfa2b95b3c /src/FlatBoundary.c | |
parent | 0d0a338cb50efccfdabbbc65c917a1e63bc05ecb (diff) |
Use the new SymBase infrastructure to find out about symmetry boundaries.
git-svn-id: http://svn.cactuscode.org/arrangements/CactusBase/Boundary/trunk@266 6a38eb6e-646e-4a02-a296-d141613ad6c4
Diffstat (limited to 'src/FlatBoundary.c')
-rw-r--r-- | src/FlatBoundary.c | 28 |
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++) { |