aboutsummaryrefslogtreecommitdiff
path: root/src/CoordinateStuff.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/CoordinateStuff.c')
-rw-r--r--src/CoordinateStuff.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/CoordinateStuff.c b/src/CoordinateStuff.c
index 4fe763b..de22af4 100644
--- a/src/CoordinateStuff.c
+++ b/src/CoordinateStuff.c
@@ -53,7 +53,7 @@ int IndexFloorC(cGH *GH, CCTK_REAL coord_value, int d)
return(-3);
}
- idummy = floor((coord_value-GH->cctk_origin_space[d])/ GH->cctk_delta_space[d]);
+ idummy = floor((coord_value-cmin)/ GH->cctk_delta_space[d]);
index_low = idummy-GH->cctk_lbnd[d];
if (GH->cctk_bbox[2*d]==1)
@@ -125,7 +125,7 @@ int IndexCeilC(cGH *GH, CCTK_REAL coord_value, int d)
return(-3);
}
- idummy = ceil((coord_value-GH->cctk_origin_space[d])/ GH->cctk_delta_space[d]);
+ idummy = ceil((coord_value-cmin)/ GH->cctk_delta_space[d]);
index_up = idummy-GH->cctk_lbnd[d];
if (GH->cctk_bbox[2*d]==1)