aboutsummaryrefslogtreecommitdiff
path: root/Carpet/Carpet/src/Timing.cc
diff options
context:
space:
mode:
authorErik Schnetter <schnetter@cct.lsu.edu>2007-01-13 01:44:00 +0000
committerErik Schnetter <schnetter@cct.lsu.edu>2007-01-13 01:44:00 +0000
commitee39c26d53b65c58d69e63d0a85abcf6310426a1 (patch)
tree564588b5be8ab1e6a89fdb7564ff7ea114769322 /Carpet/Carpet/src/Timing.cc
parent5222a5e887c9be7fbf5f905ac99285dc17db2cbb (diff)
Carpet: Change regridding API to use region_t
Change the regridding API to use region_t. This is a major API change. Use the information in region_t to correct the load balancing when outer buffer zones are used. darcs-hash:20070113014409-dae7b-33f78948a7b826ea7806513d7864730fe64c14a9.gz
Diffstat (limited to 'Carpet/Carpet/src/Timing.cc')
-rw-r--r--Carpet/Carpet/src/Timing.cc23
1 files changed, 11 insertions, 12 deletions
diff --git a/Carpet/Carpet/src/Timing.cc b/Carpet/Carpet/src/Timing.cc
index a6f5d3e2b..18ff3f171 100644
--- a/Carpet/Carpet/src/Timing.cc
+++ b/Carpet/Carpet/src/Timing.cc
@@ -74,19 +74,18 @@ namespace Carpet {
assert (mglevel >= 0);
int const ml = mglevel;
- // Exterior of this region
- ibbox const ext = vdd.at(m)->boxes.at(ml).at(rl).at(c).exterior;
- // Outer boundaries
- b2vect const obs = xpose (vhh.at(m)->outer_boundary (rl, c));
- // Number of ghost zones
- i2vect const ghosts = vdd.at(m)->ghosts;
- // Computational domain: shrink the exterior by the number
- // of ghost zones if the face is not an outer boundary.
- // This ignores ghost zones, but takes buffer zones into
- // account.
+ // Base region
+ ibbox const ext = vhh.at(m)->extent(ml,rl,c);
+ // Refinement boundaries
+ b2vect const rbs = vhh.at(m)->refinement_boundaries (rl, c);
+ // Number of buffer zones
+ i2vect const buffers = vdd.at(m)->buffers;
+ // Computational domain: Add the number of buffer zones to
+ // the base extent. This takes buffer zones into account
+ // and ignores ghost zones.
ibbox const domain =
- ext.expand (ivect (not obs[0]) * ghosts[0],
- ivect (not obs[1]) * ghosts[1]);
+ ext.expand (ivect (rbs[0]) * buffers[0],
+ ivect (rbs[1]) * buffers[1]);
// Count the grid points
num_grid_points += domain.size();