aboutsummaryrefslogtreecommitdiff
path: root/src/rotatingsymmetry90.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/rotatingsymmetry90.c')
-rw-r--r--src/rotatingsymmetry90.c29
1 files changed, 23 insertions, 6 deletions
diff --git a/src/rotatingsymmetry90.c b/src/rotatingsymmetry90.c
index 750b435..79ce5e6 100644
--- a/src/rotatingsymmetry90.c
+++ b/src/rotatingsymmetry90.c
@@ -646,7 +646,7 @@ int BndRot90VI (cGH const * restrict const cctkGH,
ierr = Util_TableDestroy (options);
assert (!ierr);
- if (poison_boundaries) {
+ if (check_boundaries) {
/* check destination grid points for poison */
int have_bnd = 1;
for (q=0; q<ndirs; ++q) {
@@ -673,6 +673,7 @@ int BndRot90VI (cGH const * restrict const cctkGH,
break;
case CCTK_VARIABLE_REAL: {
int poison_found = 0;
+ int nonfinite_found = 0;
CCTK_REAL const * restrict const varptr = varptrs[var];
CCTK_REAL poison;
memset (&poison, poison_value, sizeof poison);
@@ -681,14 +682,25 @@ int BndRot90VI (cGH const * restrict const cctkGH,
for (i=imin[2]; i<imax[0]; ++i) {
const int ind = CCTK_GFINDEX3D(cctkGH, i, j, k);
if (memcmp (&varptr[ind], &poison, sizeof poison) == 0) {
- printf (" ijk=[%d,%d,%d]\n", i, j, k);
+ printf (" poison ijk=[%d,%d,%d] val=%g\n",
+ i, j, k, (double)varptr[ind]);
poison_found = 1;
}
+ if (! isfinite(varptr[ind])) {
+ printf (" nonfinite ijk=[%d,%d,%d] val=%g\n",
+ i, j, k, (double)varptr[ind]);
+ nonfinite_found = 1;
+ }
}
}
}
- if (poison_found) {
- printf ("Poison found:\n");
+ if (poison_found || nonfinite_found) {
+ if (poison_found) {
+ printf ("Poison found:\n");
+ }
+ if (nonfinite_found) {
+ printf ("Non-finite number found:\n");
+ }
printf (" levfac=[%d,%d,%d]\n", cctk_levfac[0], cctk_levfac[1], cctk_levfac[2]);
printf (" origin_space=[%g,%g,%g]\n", cctk_origin_space[0], cctk_origin_space[1], cctk_origin_space[2]);
printf (" delta_space=[%g,%g,%g]\n", cctk_delta_space[0], cctk_delta_space[1], cctk_delta_space[2]);
@@ -696,7 +708,12 @@ int BndRot90VI (cGH const * restrict const cctkGH,
printf (" lsh=[%d,%d,%d]\n", cctk_lsh[0], cctk_lsh[1], cctk_lsh[2]);
printf (" gsh=[%d,%d,%d]\n", cctk_gsh[0], cctk_gsh[1], cctk_gsh[2]);
printf (" bbox=[%d,%d,%d,%d,%d,%d]\n", cctk_bbox[0], cctk_bbox[1], cctk_bbox[2], cctk_bbox[3], cctk_bbox[4], cctk_bbox[5]);
- CCTK_WARN (CCTK_WARN_ABORT, "Poison found in symmetry regions -- there is an error in this thorn");
+ if (poison_found) {
+ CCTK_WARN (CCTK_WARN_ABORT, "Poison found in symmetry regions -- there is an error in this thorn");
+ }
+ if (nonfinite_found) {
+ CCTK_WARN (CCTK_WARN_ALERT, "Non-finite number found in symmetry regions");
+ }
}
break;
}
@@ -707,7 +724,7 @@ int BndRot90VI (cGH const * restrict const cctkGH,
assert (0);
} /* switch grouptype */
} /* if bbox */
- } /* if poison_boundaries */
+ } /* if check_boundaries */
/* take parity into account */
have_local_bbox = 1;