aboutsummaryrefslogtreecommitdiff
path: root/Carpet
diff options
context:
space:
mode:
authorRoland Haas <roland.haas@physics.gatech.edu>2012-04-28 14:46:40 -0700
committerBarry Wardell <barry.wardell@gmail.com>2012-09-11 18:23:26 +0100
commitf6ee6617f4afe31cdaee9320fa16df12b21dbdb9 (patch)
tree1509665e6ba775174e3bbf507196996fc347e69c /Carpet
parent3f89c77d54689ac1f839da32a12cc5a3520172b9 (diff)
CarpetLibs: shift vertex centered directions in restrict_3d_vc_rf2
Diffstat (limited to 'Carpet')
-rw-r--r--Carpet/CarpetLib/src/restrict_3d_vc_rf2.cc17
1 files changed, 12 insertions, 5 deletions
diff --git a/Carpet/CarpetLib/src/restrict_3d_vc_rf2.cc b/Carpet/CarpetLib/src/restrict_3d_vc_rf2.cc
index 6599d2067..070472cc1 100644
--- a/Carpet/CarpetLib/src/restrict_3d_vc_rf2.cc
+++ b/Carpet/CarpetLib/src/restrict_3d_vc_rf2.cc
@@ -170,13 +170,20 @@ namespace CarpetLib {
if (regbbox.empty()) {
CCTK_WARN (0, "Internal error: region extent is empty");
}
+
+ // shift vertex centered directions to lower interface (see Refluxing for conventions)
+ ivect const ivert(icent == 0);
+ ibbox3 const unshifted_srcbbox = srcbbox.shift(-ivert,2);
+ ibbox3 const unshifted_dstbbox = dstbbox.shift(-ivert,2);
+ ibbox3 const unshifted_srcregbbox = srcregbbox.shift(-ivert,2);
+ ibbox3 const unshifted_regbbox = regbbox.shift(-ivert,2);
- if (not regbbox.expanded_for(srcbbox).is_contained_in(srcbbox) or
- not regbbox.is_contained_in(dstbbox))
+ if (not unshifted_regbbox.expanded_for(unshifted_srcbbox).is_contained_in(unshifted_srcbbox) or
+ not unshifted_regbbox.is_contained_in(unshifted_dstbbox))
{
- cerr << "srcbbox: " << srcbbox << endl
- << "dstbbox: " << dstbbox << endl
- << "regbbox: " << regbbox << endl;
+ cerr << "unshifted_srcbbox: " << unshifted_srcbbox << endl
+ << "unshifted_dstbbox: " << unshifted_dstbbox << endl
+ << "unshifted_regbbox: " << unshifted_regbbox << endl;
CCTK_WARN (0, "Internal error: region extent is not contained in array extent");
}