aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoland Haas <roland.haas@physics.gatech.edu>2012-04-28 14:46:40 -0700
committerRoland Haas <roland.haas@physics.gatech.edu>2012-04-28 14:46:40 -0700
commit7c544435834443a861c4cad9e2ad6e09381c6ad8 (patch)
tree19c17f6a4c1968ed2c66b52df052baf4cee85b0d
parent4c36e6fdc728fe198c719b9220a42c472025378e (diff)
CarpetLibs: shift vertex centered directions in restrict_3d_vc_rf2
-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");
}