aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortradke <tradke@c78560ca-4b45-4335-b268-5f3340f3cb52>2002-04-29 15:11:52 +0000
committertradke <tradke@c78560ca-4b45-4335-b268-5f3340f3cb52>2002-04-29 15:11:52 +0000
commit232b6ba483a879d3394984c9a5fde312b884f4ae (patch)
tree83d6b51697a9401d6c70b276fd565fe643a67aa7
parentf8b135ef31aab9d4985621c54c5243d79611029d (diff)
Bugfix from Frank.
git-svn-id: http://svn.cactuscode.org/arrangements/CactusBase/CartGrid3D/trunk@152 c78560ca-4b45-4335-b268-5f3340f3cb52
-rw-r--r--src/GetSymmetry.c34
1 files changed, 9 insertions, 25 deletions
diff --git a/src/GetSymmetry.c b/src/GetSymmetry.c
index 0083168..4fbc67c 100644
--- a/src/GetSymmetry.c
+++ b/src/GetSymmetry.c
@@ -47,7 +47,7 @@ void CCTK_FCALL CCTK_FNAME(GetCartSymGN)
********************************************************************/
/*@@
- @routine GetCartSymmetry
+ @routine GetCartSymVI
@date Mon Mar 15 15:10:58 1999
@author Frank Herrmann
@desc
@@ -63,7 +63,7 @@ int GetCartSymVI(const cGH *GH, int *sym, int vi)
/* Pointer to the SymmetryGHextension */
- sGHex = (SymmetryGHex *)GH->extensions[CCTK_GHExtensionHandle("Symmetry")];
+ sGHex = (SymmetryGHex *)CCTK_GHExtension(GH, "Symmetry");
/* Reference the hash table in the GHex and get the kind of
* symmetry being applied
@@ -79,20 +79,9 @@ int GetCartSymVI(const cGH *GH, int *sym, int vi)
for (dir=0; dir<MAX_FACE; ++dir)
{
if (domainsym[dir])
- {
sym[dir/2]=sGHex->GFSym[vi][dir];
- }
- else
- {
- CCTK_WARN(0,"symmetry not known");;
- }
}
-#ifdef SYM_DEBUG
- printf("GetSymmetry: %s [%d,%d,%d]\n\n",imp_gf,
- sGHex->GFSym[vi][0],sGHex->GFSym[vi][2],sGHex->GFSym[vi][4]);
-#endif
-
return 0;
}
@@ -108,7 +97,7 @@ void CCTK_FCALL CCTK_FNAME(GetCartSymVI)
@date April 12 2002
@author Frank Herrmann
@desc
- Gets symmetry boundary conditions from variable index
+ Gets symmetry boundary conditions from variable name
@enddesc
@@*/
int GetCartSymVN(const cGH *GH, int *sym, const char *vn)
@@ -157,7 +146,7 @@ int GetCartSymGI(const cGH *GH, int *sym, int gi)
CCTK_WARN(3,"this code was not yet tested");
- sGHex =(SymmetryGHex *)GH->extensions[CCTK_GHExtensionHandle("Symmetry")];
+ sGHex =(SymmetryGHex *)CCTK_GHExtension(GH, "Symmetry");
first_vari = CCTK_FirstVarIndexI(gi);
numvars = CCTK_NumVarsInGroupI(gi);
@@ -185,22 +174,17 @@ int GetCartSymGI(const cGH *GH, int *sym, int gi)
for (dir=0; dir<MAX_FACE; dir++)
{
+ /* this was copied from SetSymmetry.c.
+ * a couple of cases are not checked, in particular GFSYM_NOSYM
+ * for simple octant symmetry, sym[] will contain the symmetry
+ * value. Other cases have not been checked.
+ */
if (domainsym[dir])
{
sym[dir/2]=sGHex->GFSym[vi][dir];
}
- else
- {
- CCTK_WARN(1,"Symmetry not found");
- }
}
-#ifdef SYM_DEBUG
- printf("GetSymmetry: %s [%d,%d,%d]\n\n",imp_gf,
- sGHex->GFSym[vi][0],
- sGHex->GFSym[vi][2],
- sGHex->GFSym[vi][4]);
-#endif
}
return(0);
}