diff options
author | schnetter <schnetter@20f44201-0f4f-0410-9130-e5fc2714a787> | 2004-04-09 11:36:59 +0000 |
---|---|---|
committer | schnetter <schnetter@20f44201-0f4f-0410-9130-e5fc2714a787> | 2004-04-09 11:36:59 +0000 |
commit | febdf3f8176e7e5bfb6483482d806cd55398a361 (patch) | |
tree | 435db7741e707b350bef3955f862747c0c7fdcc6 /src/rotatingsymmetry180.c | |
parent | 2ae7711961ab0ac3bd9bd374787e305e0cf1f7fd (diff) |
Fix bugs, and move conditional into the schedule.
git-svn-id: http://svn.cactuscode.org/arrangements/CactusNumerical/RotatingSymmetry180/trunk@4 20f44201-0f4f-0410-9130-e5fc2714a787
Diffstat (limited to 'src/rotatingsymmetry180.c')
-rw-r--r-- | src/rotatingsymmetry180.c | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/src/rotatingsymmetry180.c b/src/rotatingsymmetry180.c index ebff1db..d5143ea 100644 --- a/src/rotatingsymmetry180.c +++ b/src/rotatingsymmetry180.c @@ -42,7 +42,7 @@ int BndRot180VI (cGH const * restrict const cctkGH, struct xferinfo * restrict xferinfo; - int dirs[2]; + int alldirs[2]; int dir; /* direction of the symmetry face */ int otherdir; /* the other direction of the rotation */ int q; @@ -54,8 +54,6 @@ int BndRot180VI (cGH const * restrict const cctkGH, assert (stencil); assert (vi>=0 && vi<CCTK_NumVars()); - if (! rotating_symmetry_180) return; - if (verbose) { fullname = CCTK_FullName(vi); assert (fullname); @@ -65,11 +63,6 @@ int BndRot180VI (cGH const * restrict const cctkGH, free (fullname); } - for (d=0; d<group.dim; ++d) { - x0[d] = CCTK_ORIGIN_SPACE(d); - dx[d] = CCTK_DELTA_SPACE(d); - } - /* Get and check group info */ gi = CCTK_GroupIndexFromVarI (vi); assert (gi>=0 && gi<CCTK_NumGroups()); @@ -86,6 +79,11 @@ int BndRot180VI (cGH const * restrict const cctkGH, varptr = CCTK_VarDataPtrI (cctkGH, 0, vi); assert (varptr); + for (d=0; d<group.dim; ++d) { + x0[d] = CCTK_ORIGIN_SPACE(d); + dx[d] = CCTK_DELTA_SPACE(d); + } + /* find parity */ { char tensortypealias[100]; @@ -190,12 +188,12 @@ int BndRot180VI (cGH const * restrict const cctkGH, } /* directions */ - dirs[0] = 0; - dirs[1] = 1; + alldirs[0] = 0; + alldirs[1] = 1; /* Find grid point that corresponds to the origin */ for (q=0; q<2; ++q) { - d = dirs[q]; + d = alldirs[q]; /* x0 + dx * origin == 0 */ origin[d] = - x0[d] / dx[d]; dorigin[d] = origin[d] - floor(origin[d]); |