diff options
author | Erik Schnetter <schnetter@cct.lsu.edu> | 2010-08-27 10:15:05 -0400 |
---|---|---|
committer | Barry Wardell <barry.wardell@gmail.com> | 2011-12-14 18:24:02 +0000 |
commit | 56c48bcc0629b3ef609cbcab4620be4aab7aa399 (patch) | |
tree | 482e3a0d903042f2b969466ef96d9379fcad056a /Carpet/CarpetLib/src/data.cc | |
parent | c8f4f8eca998e995c90bd8e4c72b23ebedd70207 (diff) |
CarpetLib: Correctly determine face-centered grids while restricting
Diffstat (limited to 'Carpet/CarpetLib/src/data.cc')
-rw-r--r-- | Carpet/CarpetLib/src/data.cc | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/Carpet/CarpetLib/src/data.cc b/Carpet/CarpetLib/src/data.cc index 9537453de..2c76c6a3b 100644 --- a/Carpet/CarpetLib/src/data.cc +++ b/Carpet/CarpetLib/src/data.cc @@ -976,12 +976,10 @@ transfer_restrict (data const * const src, box); break; case cell_centered: { - ivect const is_centered = - ((src->extent().lower() - this->extent().lower()) % - src->extent().stride()) != - ivect(0,0,0); -#warning "TODO" - cout << "REF restrict CC " << is_centered << "\n"; + assert (all (box.stride() == this->extent().stride())); + ivect const izero (0); + ivect const ioff = box.lower() - this->extent().lower(); + ivect const is_centered = ioff % this->extent().stride() == izero; if (all(is_centered == ivect(1,1,1))) { call_operator<T> (& restrict_3d_cc_rf2, static_cast <T const *> (src->storage()), |