diff options
author | Roland Haas <roland.haas@physics.gatech.edu> | 2012-05-03 19:04:00 -0700 |
---|---|---|
committer | Roland Haas <roland.haas@physics.gatech.edu> | 2012-05-03 19:04:00 -0700 |
commit | 32246ae235253b9bcf1fb9828ad84f48e8d557b8 (patch) | |
tree | 61928432151c139b3a8b59efcd79cef40fa001a0 /Carpet/CarpetLib/src/operator_prototypes_3d.hh | |
parent | 5c2a096d1b6f690d61bab2aec714c714154e8cec (diff) |
CarpetLib: add offset3 function identical to index3 without tests
index3 fails with CARPET_DEBUG if it is asked for an index outisde of
the box, which happens in the operators when they try to ask for di
offsets for a box of width 1
Diffstat (limited to 'Carpet/CarpetLib/src/operator_prototypes_3d.hh')
-rw-r--r-- | Carpet/CarpetLib/src/operator_prototypes_3d.hh | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/Carpet/CarpetLib/src/operator_prototypes_3d.hh b/Carpet/CarpetLib/src/operator_prototypes_3d.hh index b9cb7d343..dd5eb14d9 100644 --- a/Carpet/CarpetLib/src/operator_prototypes_3d.hh +++ b/Carpet/CarpetLib/src/operator_prototypes_3d.hh @@ -35,6 +35,16 @@ namespace CarpetLib { + static inline + size_t + offset3 (size_t const i, size_t const j, size_t const k, + size_t const exti, size_t const extj, size_t const extk) + { + return i + exti * (j + extj * k); + } + + + static int const dim3 = 3; typedef vect <bool, dim3> bvect3; |