aboutsummaryrefslogtreecommitdiff
path: root/Carpet/CarpetEvolutionMask
diff options
context:
space:
mode:
authorErik Schnetter <schnetter@cct.lsu.edu>2010-04-27 09:48:05 -0500
committerBarry Wardell <barry.wardell@gmail.com>2011-12-14 16:45:43 +0000
commit78523074f0fb7c1ffbeea904716b2499be066e54 (patch)
treecf11751efa891726888f7be3187230f9b39cc19e /Carpet/CarpetEvolutionMask
parent5758e652fb8f26243b59b54970cdbbbec39178fe (diff)
CarpetEvolutionMask: Use new bboxset functions to simplify code
Diffstat (limited to 'Carpet/CarpetEvolutionMask')
-rw-r--r--Carpet/CarpetEvolutionMask/src/evolution_mask.cc24
1 files changed, 6 insertions, 18 deletions
diff --git a/Carpet/CarpetEvolutionMask/src/evolution_mask.cc b/Carpet/CarpetEvolutionMask/src/evolution_mask.cc
index ee0b43804..79f4d5a08 100644
--- a/Carpet/CarpetEvolutionMask/src/evolution_mask.cc
+++ b/Carpet/CarpetEvolutionMask/src/evolution_mask.cc
@@ -100,15 +100,10 @@ namespace CarpetEvolutionMask {
for (int d=0; d<dim;d++) {
antishrinkby[d] = cctkGH->cctk_nghostzones[d] + buffer_width;
}
- ibset antishrunk;
- for (ibset::const_iterator bi = antirefined.begin();
- bi != antirefined.end();
- ++bi)
- {
- antishrunk |= (*bi).expand(antishrinkby, antishrinkby).expanded_for(coarsebase);
- }
- antishrunk.normalize();
-
+ ibset antishrunk
+ (antirefined.expand(antishrinkby, antishrinkby).
+ expanded_for(coarsebase));
+
// cout << "antishrunk1: " << antishrunk << endl;
// now cut away dangling edges
@@ -117,7 +112,7 @@ namespace CarpetEvolutionMask {
// cout << "antishrunk2: " << antishrunk << endl;
// cut holes into coarsebase
- ibset shrunk = coarsebase - antishrunk;
+ ibset const shrunk = coarsebase - antishrunk;
// cout << "shrunk: " << shrunk << endl;
@@ -140,14 +135,7 @@ namespace CarpetEvolutionMask {
enlargeby[d] = cctkGH->cctk_nghostzones[d] + buffer_width +
stencil_size;
}
- ibset enlarged;
- for (ibset::const_iterator bi = notrefined.begin();
- bi != notrefined.end();
- ++bi)
- {
- enlarged |= (*bi).expand(enlargeby, enlargeby);
- }
- enlarged.normalize();
+ ibset const enlarged (notrefined.expand(enlargeby, enlargeby));
// cout << "enlarged: " << enlarged << endl;