From 77aea476ad1cbd8a1a1028e9c73e5d0ac4c568b8 Mon Sep 17 00:00:00 2001 From: Erik Schnetter Date: Fri, 11 May 2012 12:52:59 -0400 Subject: CarpetLib: Correct determining buffer and overlap zones --- Carpet/CarpetLib/src/dh.cc | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'Carpet/CarpetLib') 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 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; -- cgit v1.2.3