aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoreschnett <eschnett@ff385933-4943-42dc-877b-ffc776028de6>2013-01-22 03:00:35 +0000
committereschnett <eschnett@ff385933-4943-42dc-877b-ffc776028de6>2013-01-22 03:00:35 +0000
commite094fbe59aed00dff8ad878def73998b1ded4e97 (patch)
tree9c79a0dcd0996c04ec5bb5b0b9d024a485afe536
parent59b159bdb44d7a42d122aefc079775b9fbea86ae (diff)
Handle cctk_ash correctly for complex numbersHEADmaster
git-svn-id: http://svn.cactuscode.org/arrangements/CactusUtils/NaNChecker/trunk@114 ff385933-4943-42dc-877b-ffc776028de6
-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))
{