aboutsummaryrefslogtreecommitdiff
path: root/Carpet/CarpetLib/src/prolongate_3d_cc_rf2.cc
diff options
context:
space:
mode:
authorRoland Haas <roland.haas@physics.gatech.edu>2012-05-03 19:04:00 -0700
committerRoland Haas <roland.haas@physics.gatech.edu>2012-05-03 19:04:00 -0700
commit32246ae235253b9bcf1fb9828ad84f48e8d557b8 (patch)
tree61928432151c139b3a8b59efcd79cef40fa001a0 /Carpet/CarpetLib/src/prolongate_3d_cc_rf2.cc
parent5c2a096d1b6f690d61bab2aec714c714154e8cec (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/prolongate_3d_cc_rf2.cc')
-rw-r--r--Carpet/CarpetLib/src/prolongate_3d_cc_rf2.cc10
1 files changed, 6 insertions, 4 deletions
diff --git a/Carpet/CarpetLib/src/prolongate_3d_cc_rf2.cc b/Carpet/CarpetLib/src/prolongate_3d_cc_rf2.cc
index 7ddecd992..827d6d611 100644
--- a/Carpet/CarpetLib/src/prolongate_3d_cc_rf2.cc
+++ b/Carpet/CarpetLib/src/prolongate_3d_cc_rf2.cc
@@ -47,6 +47,8 @@ namespace CarpetLib {
#define SRCIND3(i,j,k) index3 (i, j, k, srciext, srcjext, srckext)
#define DSTIND3(i,j,k) index3 (i, j, k, dstiext, dstjext, dstkext)
+#define SRCOFF3(i,j,k) offset3 (i, j, k, srciext, srcjext, srckext)
+#define DSTOFF3(i,j,k) offset3 (i, j, k, dstiext, dstjext, dstkext)
@@ -443,11 +445,11 @@ namespace CarpetLib {
size_t const k0 = srckoff / 2;
- // size_t const srcdi = SRCIND3(1,0,0) - SRCIND3(0,0,0);
+ // size_t const srcdi = SRCOFF3(1,0,0) - SRCOFF3(0,0,0);
size_t const srcdi = 1;
- assert (srcdi == SRCIND3(1,0,0) - SRCIND3(0,0,0));
- size_t const srcdj = SRCIND3(0,1,0) - SRCIND3(0,0,0);
- size_t const srcdk = SRCIND3(0,0,1) - SRCIND3(0,0,0);
+ assert (srcdi == SRCOFF3(1,0,0) - SRCOFF3(0,0,0));
+ size_t const srcdj = SRCOFF3(0,1,0) - SRCOFF3(0,0,0);
+ size_t const srcdk = SRCOFF3(0,0,1) - SRCOFF3(0,0,0);