aboutsummaryrefslogtreecommitdiff
path: root/Carpet/CarpetLib
diff options
context:
space:
mode:
Diffstat (limited to 'Carpet/CarpetLib')
-rw-r--r--Carpet/CarpetLib/src/bbox.hh2
1 files changed, 1 insertions, 1 deletions
diff --git a/Carpet/CarpetLib/src/bbox.hh b/Carpet/CarpetLib/src/bbox.hh
index 85af2fcd3..2646cb971 100644
--- a/Carpet/CarpetLib/src/bbox.hh
+++ b/Carpet/CarpetLib/src/bbox.hh
@@ -110,7 +110,7 @@ public:
vect<T,D> stride () const { return _stride; }
/** Get offset. */
- vect<T,D> offset () const { return (_lower % _stride + _stride) % _stride; }
+ vect<T,D> offset () const { return imod(_lower, _stride); }
/** Get the shape (or extent). */
vect<T,D> shape () const { return _upper - _lower + _stride; }