aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/SymmetryWrappers.c42
1 files changed, 8 insertions, 34 deletions
diff --git a/src/SymmetryWrappers.c b/src/SymmetryWrappers.c
index 82f6649..20c22a4 100644
--- a/src/SymmetryWrappers.c
+++ b/src/SymmetryWrappers.c
@@ -101,23 +101,10 @@ int CartSymGI(cGH *GH, int gi)
/* Set value to one if grid is staggered around the center */
- /* default: we assume not staggered */
- cntstag[0]=0;
- cntstag[1]=0;
- cntstag[2]=0;
-
- if (no_origin)
- {
- cntstag[0]=1;
- cntstag[1]=1;
- cntstag[2]=1;
- }
- else
- {
- if (no_originx) cntstag[0] = 1;
- if (no_originy) cntstag[1] = 1;
- if (no_originz) cntstag[2] = 1;
- }
+ /* Avoid origin? Default is yes */
+ cntstag[0] = no_origin && no_originx && avoid_origin && avoid_originx;
+ cntstag[1] = no_origin && no_originy && avoid_origin && avoid_originy;
+ cntstag[2] = no_origin && no_originz && avoid_origin && avoid_originz;
/* Use next time level, if present */
time = CCTK_NumTimeLevelsFromVarI(first_vi) - 1;
@@ -306,23 +293,10 @@ int CartSymVI(cGH *GH, int vi)
/* get the directional staggering of the group */
berr = CCTK_GroupStaggerDirArrayGI(dstag, gdim, gi);
- /* default: we assume not staggered */
- cntstag[0]=0;
- cntstag[1]=0;
- cntstag[2]=0;
-
- if (no_origin)
- {
- cntstag[0]=1;
- cntstag[1]=1;
- cntstag[2]=1;
- }
- else
- {
- if (no_originx) cntstag[0] = 1;
- if (no_originy) cntstag[1] = 1;
- if (no_originz) cntstag[2] = 1;
- }
+ /* Avoid origin? Default is yes */
+ cntstag[0] = no_origin && no_originx && avoid_origin && avoid_originx;
+ cntstag[1] = no_origin && no_originy && avoid_origin && avoid_originy;
+ cntstag[2] = no_origin && no_originz && avoid_origin && avoid_originz;
/* Use next time level, if present */
time = CCTK_NumTimeLevelsFromVarI(vi) - 1;