diff options
-rw-r--r-- | src/CartGrid3D.c | 6 | ||||
-rw-r--r-- | src/GHExtension.c | 6 | ||||
-rw-r--r-- | src/Startup.c | 3 | ||||
-rw-r--r-- | src/Symmetry.c | 13 | ||||
-rw-r--r-- | src/SymmetryWrappers.c | 9 |
5 files changed, 16 insertions, 21 deletions
diff --git a/src/CartGrid3D.c b/src/CartGrid3D.c index 181e20f..384e41a 100644 --- a/src/CartGrid3D.c +++ b/src/CartGrid3D.c @@ -60,6 +60,9 @@ void CartGrid3D(CCTK_ARGUMENTS) cntstag[1] = no_origin && no_originy && avoid_origin && avoid_originy; cntstag[2] = no_origin && no_originz && avoid_origin && avoid_originz; + /* Determine symmetries of domain */ + DecodeSymParameters3D(domainsym); + /* Calculate physical indices, using symmetries and periodicity */ if (domainsym[0]) { @@ -108,9 +111,6 @@ void CartGrid3D(CCTK_ARGUMENTS) dconv = pow(2, cctk_convlevel); iconv = (int)dconv; - /* Determine symmetries of domain */ - DecodeSymParameters3D(domainsym); - /**************************************************************** * * BYRANGE diff --git a/src/GHExtension.c b/src/GHExtension.c index 2172918..031ed5d 100644 --- a/src/GHExtension.c +++ b/src/GHExtension.c @@ -18,6 +18,7 @@ static const char *rcsid = "$Header$"; CCTK_FILEVERSION(CactusBase_CartGrid3D_GHExtension_c) void *Symmetry_AllocGHex(tFleshConfig *config, int convlevel, cGH *GH) ; +int Symmetry_InitFGHex(cGH *GH); void *Symmetry_AllocGHex(tFleshConfig *config, int convlevel, cGH *GH) { @@ -54,8 +55,9 @@ void *Symmetry_AllocGHex(tFleshConfig *config, int convlevel, cGH *GH) } -void Symmetry_InitGHex(cGH *GH) +int Symmetry_InitGHex(cGH *GH) { + int retval = 0; SymmetryGHex *newGHex; int handle; int gf,d; @@ -74,6 +76,8 @@ void Symmetry_InitGHex(cGH *GH) newGHex->GFSym[gf][d] = GFSYM_UNSET; /* not set */ } } + + return retval; } diff --git a/src/Startup.c b/src/Startup.c index 2eb9dd9..c094bb1 100644 --- a/src/Startup.c +++ b/src/Startup.c @@ -15,7 +15,8 @@ CCTK_FILEVERSION(CactusBase_CartGrid3D_Startup_c) void *Symmetry_AllocGHex(tFleshConfig *config, int convlevel, cGH *GH); int Symmetry_InitGHex(cGH *GH); - +int SymmetryStartup(void); +int RegisterCartGrid3DCoords(void); /*@@ @routine SymmetryStartup diff --git a/src/Symmetry.c b/src/Symmetry.c index a664d30..44f2baa 100644 --- a/src/Symmetry.c +++ b/src/Symmetry.c @@ -22,11 +22,11 @@ CCTK_FILEVERSION(CactusBase_CartGrid3D_Symmetry_c) /*#define SYM_DEBUG*/ -int CartApplySym3Di(cGH *GH, int gdim, int *doSym, int *cntstag, +int CartApplySym3Di(cGH *GH, int *doSym, int *cntstag, int *lssh, int *ghostz, int *sym, CCTK_REAL *var); -int CartApplySym2Di(cGH *GH, int gdim, int *doSym, int *cntstag, +int CartApplySym2Di(cGH *GH, int *doSym, int *cntstag, int *lssh, int *ghostz, int *sym, CCTK_REAL *var); -int CartApplySym1Di(cGH *GH, int gdim, int *doSym, int *cntstag, +int CartApplySym1Di(cGH *GH, int *doSym, int *cntstag, int *lssh, int *ghostz, int *sym, CCTK_REAL *var); @@ -38,7 +38,6 @@ int CartApplySym1Di(cGH *GH, int gdim, int *doSym, int *cntstag, Variables passed through: cGH *GH pointer to cGH - int gdim dimension of the variable int *doSym flags whether to apply a symmetries on a given face size 2*dim, here we only check for lower faces:0,2,4 int *cntstag value used when the gridpoints are staggered @@ -63,7 +62,7 @@ int CartApplySym1Di(cGH *GH, int gdim, int *doSym, int *cntstag, @@*/ -int CartApplySym3Di(cGH *GH, int gdim, int *doSym, int *cntstag, +int CartApplySym3Di(cGH *GH, int *doSym, int *cntstag, int *lssh, int *ghostz, int *sym, CCTK_REAL *var) { @@ -147,7 +146,7 @@ int CartApplySym3Di(cGH *GH, int gdim, int *doSym, int *cntstag, @@*/ -int CartApplySym2Di(cGH *GH, int gdim, int *doSym, int *cntstag, +int CartApplySym2Di(cGH *GH, int *doSym, int *cntstag, int *lssh, int *ghostz, int *sym, CCTK_REAL *var) { int i,j; @@ -201,7 +200,7 @@ int CartApplySym2Di(cGH *GH, int gdim, int *doSym, int *cntstag, @@*/ -int CartApplySym1Di(cGH *GH, int gdim, int *doSym, int *cntstag, +int CartApplySym1Di(cGH *GH, int *doSym, int *cntstag, int *lssh, int *ghostz, int *sym, CCTK_REAL *var) { int i; diff --git a/src/SymmetryWrappers.c b/src/SymmetryWrappers.c index abc8e97..19386fb 100644 --- a/src/SymmetryWrappers.c +++ b/src/SymmetryWrappers.c @@ -22,7 +22,6 @@ void CCTK_FCALL CCTK_FNAME(CartSymVN) (int *ierr, cGH *GH, ONE_FORTSTRING_ARG); int CartApplySym3Di(cGH *GH, - int gdim, int *doSym, int *cntstag, int *lssh, @@ -31,7 +30,6 @@ int CartApplySym3Di(cGH *GH, CCTK_REAL *var); int CartApplySym2Di(cGH *GH, - int gdim, int *doSym, int *cntstag, int *lssh, @@ -40,7 +38,6 @@ int CartApplySym2Di(cGH *GH, CCTK_REAL *var); int CartApplySym1Di(cGH *GH, - int gdim, int *doSym, int *cntstag, int *lssh, @@ -164,7 +161,6 @@ int CartSymGI(cGH *GH, int gi) switch (gdim) { case 1: berr = CartApplySym1Di(GH, - gdim, doSym, cntstag, lssh, @@ -172,7 +168,6 @@ int CartSymGI(cGH *GH, int gi) sGHex->GFSym[vi], GH->data[vi][time]); break; case 2: berr = CartApplySym2Di(GH, - gdim, doSym, cntstag, lssh, @@ -180,7 +175,6 @@ int CartSymGI(cGH *GH, int gi) sGHex->GFSym[vi], GH->data[vi][time]); break; case 3: berr = CartApplySym3Di(GH, - gdim, doSym, cntstag, lssh, @@ -356,7 +350,6 @@ int CartSymVI(cGH *GH, int vi) switch (gdim) { case 1: berr = CartApplySym1Di(GH, - gdim, doSym, cntstag, lssh, @@ -364,7 +357,6 @@ int CartSymVI(cGH *GH, int vi) sGHex->GFSym[vi], GH->data[vi][time]); break; case 2: berr = CartApplySym2Di(GH, - gdim, doSym, cntstag, lssh, @@ -372,7 +364,6 @@ int CartSymVI(cGH *GH, int vi) sGHex->GFSym[vi], GH->data[vi][time]); break; case 3: berr = CartApplySym3Di(GH, - gdim, doSym, cntstag, lssh, |