diff options
author | Erik Schnetter <schnetter@gmail.com> | 2012-05-11 12:52:59 -0400 |
---|---|---|
committer | Barry Wardell <barry.wardell@gmail.com> | 2012-09-11 18:23:20 +0100 |
commit | 77aea476ad1cbd8a1a1028e9c73e5d0ac4c568b8 (patch) | |
tree | c8d71679866970c4c1887f029f13f6ddf9754a2b /Carpet | |
parent | b2816d0fead5b5f23b4474ba5dd868d51f97aa8c (diff) |
CarpetLib: Correct determining buffer and overlap zones
Diffstat (limited to 'Carpet')
-rw-r--r-- | Carpet/CarpetLib/src/dh.cc | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/Carpet/CarpetLib/src/dh.cc b/Carpet/CarpetLib/src/dh.cc index b01010b03..c6aea0f4e 100644 --- a/Carpet/CarpetLib/src/dh.cc +++ b/Carpet/CarpetLib/src/dh.cc @@ -519,23 +519,24 @@ regrid (bool const do_init) CCTK_WARN (CCTK_WARN_COMPLAIN, buf.str().c_str()); } - ibset const notactive_overlaps = notowned.expand (overlap_width);; vector<ibset> notactive_stepped (num_substeps+1); - notactive_stepped.AT(0) = notactive_overlaps; + notactive_stepped.AT(0) = notowned; for (int substep = 1; substep <= num_substeps; ++ substep) { notactive_stepped.AT(substep) = notactive_stepped.AT(substep-1).expand (ghost_width); } + ibset const notactive_overlaps = + notactive_stepped.AT(num_substeps).expand (overlap_width); if (all (all (buffer_width == num_substeps * ghost_width))) { - ASSERT_rl (notactive_stepped.AT(num_substeps) == notactive, - "The stepped not-active region must be equal to the not-active region"); + ASSERT_rl (notactive_overlaps == notactive, + "The stepped not-owned region including overlaps must be equal to the not-active region"); } - // All overlap zones - ibset const alloverlaps = allowned & notactive_overlaps; - // All buffer zones - ibset const allbuffers = allowned & notactive - alloverlaps; + ibset const allbuffers = allowned & notowned.expand (buffer_width); + + // All overlap zones + ibset const alloverlaps = allowned & notactive - allbuffers; // All active points ibset& allactive = level_level.active; |