aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/NaNCheck.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/NaNCheck.cc b/src/NaNCheck.cc
index cc98b2c..c9d315a 100644
--- a/src/NaNCheck.cc
+++ b/src/NaNCheck.cc
@@ -687,11 +687,13 @@ CHECK_DATA(const cctk_type *_data, int nelems, const CCTK_REAL *CarpetWeights,
{
bool is_inside = true;
int amended_index = _i;
+ if (fp_type==2) amended_index /= 2;
for (int d=0; d<gdata.dim; ++d) {
int dir_index = amended_index % gdata.ash[d];
is_inside &= dir_index < gdata.lsh[d];
amended_index /= gdata.ash[d];
}
+ assert(amended_index == 0);
if (is_inside && (!CarpetWeights || CarpetWeights[_i] > 0.0))
{