diff options
author | schnetter <schnetter@c3c03602-0f4f-0410-b3fa-d2c81c8a7dc5> | 2006-08-04 18:17:12 +0000 |
---|---|---|
committer | schnetter <schnetter@c3c03602-0f4f-0410-b3fa-d2c81c8a7dc5> | 2006-08-04 18:17:12 +0000 |
commit | 2c55bc0ee06c1d5cf85bf036501c508fff690103 (patch) | |
tree | 8e4bfe2cf17c8ec817351a8724b7b4c2a01834a2 | |
parent | d6882db7f551eb70b47165e75d1e587085266242 (diff) |
Slight cleanup of the error message that there are not enough grid
points.
Handle complex variables.
git-svn-id: http://svn.cactuscode.org/arrangements/CactusNumerical/RotatingSymmetry90/trunk@36 c3c03602-0f4f-0410-b3fa-d2c81c8a7dc5
-rw-r--r-- | src/rotatingsymmetry90.c | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/src/rotatingsymmetry90.c b/src/rotatingsymmetry90.c index b73e29d..8e89689 100644 --- a/src/rotatingsymmetry90.c +++ b/src/rotatingsymmetry90.c @@ -419,11 +419,12 @@ int BndRot90VI (cGH const * restrict const cctkGH, if (data.gsh[otherdir[q]] < data.nghostzones[dir[q]] + data.nghostzones[otherdir[q]] + offset[otherdir[q]]) { assert (nvars > 0); + var = 0; CCTK_VWarn (0, __LINE__, __FILE__, CCTK_THORNSTRING, "The group \"%s\" has in the %c-direction only %d grid points. " "This is not large enough for a 90 degree rotating symmetry boundary that is %d grid points wide in the %c-direction. " "The group needs to have at least %d grid points in the %c-direction.", - CCTK_GroupNameFromVarI(vis[0]), "xyz"[dir[q]], data.gsh[dir[q]], + CCTK_GroupNameFromVarI(vis[var]), "xyz"[dir[q]], data.gsh[dir[q]], data.nghostzones[dir[q]], "xyz"[otherdir[q]], data.nghostzones[dir[q]] + data.nghostzones[otherdir[q]] + offset[otherdir[q]], "xyz"[dir[q]]); } @@ -536,6 +537,21 @@ int BndRot90VI (cGH const * restrict const cctkGH, } } break; + case CCTK_VARIABLE_COMPLEX: + { + CCTK_COMPLEX const czero = CCTK_Cmplx (0.0, 0.0); + for (k=imin[2]; k<imax[2]; ++k) { + for (j=imin[1]; j<imax[1]; ++j) { + for (i=imin[0]; i<imax[0]; ++i) { + const int ind = CCTK_GFINDEX3D(cctkGH, i, j, k); + CCTK_COMPLEX * restrict const ptr = + & ((CCTK_COMPLEX *) varptrs[var]) [ind]; + * ptr = CCTK_CmplxSub (czero, * ptr); + } + } + } + } + break; default: assert (0); } /* switch grouptype */ |