aboutsummaryrefslogtreecommitdiff
path: root/Carpet/CarpetLib/src/restrict_3d_vc_rf2.cc
diff options
context:
space:
mode:
authorErik Schnetter <schnetter@cct.lsu.edu>2012-02-05 20:24:09 -0500
committerBarry Wardell <barry.wardell@gmail.com>2012-09-11 18:17:59 +0100
commit8554617595eb9f16608a52487ff142ca6fccb9f6 (patch)
treef162a22c99af86d69738cb513384b02561209c4f /Carpet/CarpetLib/src/restrict_3d_vc_rf2.cc
parent97e44e585ea966068eefb7e2e48cefad171d0d19 (diff)
Re-organise some refluxing internals
Re-organise some of the internal details of refluxing. Refluxing requires restricting fluxes from fine to coarse grids. Previously, Carpet would internally store bounding boxes that were offset by 1/2 grid point, and adjust (correct) these boxes in various places in a rather ad-hoc manner. This is now cleaned up. Remove the (unused) "accumulate" operator, and the (unused) "accumulate" prolongation type.
Diffstat (limited to 'Carpet/CarpetLib/src/restrict_3d_vc_rf2.cc')
-rw-r--r--Carpet/CarpetLib/src/restrict_3d_vc_rf2.cc22
1 files changed, 9 insertions, 13 deletions
diff --git a/Carpet/CarpetLib/src/restrict_3d_vc_rf2.cc b/Carpet/CarpetLib/src/restrict_3d_vc_rf2.cc
index 97047760c..acf27fb95 100644
--- a/Carpet/CarpetLib/src/restrict_3d_vc_rf2.cc
+++ b/Carpet/CarpetLib/src/restrict_3d_vc_rf2.cc
@@ -135,7 +135,7 @@ namespace CarpetLib {
ivect3 const & restrict dstext,
ibbox3 const & restrict srcbbox,
ibbox3 const & restrict dstbbox,
- ibbox3 const & restrict,
+ ibbox3 const & restrict srcregbbox,
ibbox3 const & restrict regbbox,
void * extraargs)
{
@@ -148,9 +148,6 @@ namespace CarpetLib {
// false: vertex centered, true: cell centered
ivect const icent (centi, centj, centk);
assert (all (icent == 0 or icent == 1));
- bvect const cent (icent);
-
-
if (any (srcbbox.stride() >= regbbox.stride() or
dstbbox.stride() != regbbox.stride()))
@@ -183,22 +180,19 @@ namespace CarpetLib {
ivect3 const regext = regbbox.shape() / regbbox.stride();
- assert (all (srcbbox.stride() % either (cent, 2, 1) == 0));
- if (not (all ((regbbox.lower() - srcbbox.lower() -
- either (cent, srcbbox.stride() / 2, 0)) %
+ assert (all (srcbbox.stride() % 2 == 0));
+ if (not (all ((regbbox.lower() - srcbbox.lower() - srcbbox.stride() / 2) %
srcbbox.stride() == 0)))
{
cout << "restrict_3d_vc_rf2.cc\n";
cout << "regbbox=" << regbbox << "\n";
cout << "srcbbox=" << srcbbox << "\n";
- cout << "cent=" << cent << "\n";
+ cout << "icent=" << icent << "\n";
}
- assert (all ((regbbox.lower() - srcbbox.lower() -
- either (cent, srcbbox.stride() / 2, 0)) %
+ assert (all ((regbbox.lower() - srcbbox.lower() - srcbbox.stride() / 2) %
srcbbox.stride() == 0));
ivect3 const srcoff =
- (regbbox.lower() - srcbbox.lower() -
- either (cent, srcbbox.stride() / 2, 0)) /
+ (regbbox.lower() - srcbbox.lower() - srcbbox.stride() / 2) /
srcbbox.stride();
assert (all ((regbbox.lower() - dstbbox.lower()) % dstbbox.stride() == 0));
ivect3 const dstoff =
@@ -226,7 +220,9 @@ namespace CarpetLib {
int const dstjoff = dstoff[1];
int const dstkoff = dstoff[2];
- size_t const srcdi = SRCIND3(1,0,0) - SRCIND3(0,0,0);
+ // size_t const srcdi == SRCIND3(1,0,0) - SRCIND3(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);