aboutsummaryrefslogtreecommitdiff
path: root/Carpet/CarpetRegrid/src/moving.cc
diff options
context:
space:
mode:
authorErik Schnetter <schnetter@aei.mpg.de>2005-02-01 22:58:00 +0000
committerErik Schnetter <schnetter@aei.mpg.de>2005-02-01 22:58:00 +0000
commit0914bc88c7aea61eedf470a903c8fa252bdc97dd (patch)
treec11153db9c2272c28d1861a42e543942c49a7dd1 /Carpet/CarpetRegrid/src/moving.cc
parentf9fe6d4b5a573027170f45784dae4b094160c546 (diff)
global: Change the way in which the grid hierarchy is stored
Change the way in which the grid hierarchy is stored. The new hierarchy is map mglevel reflevel component timelevel i.e., mglevel moved from the bottom to almost the top. This is because mglevel used to be a true multigrid level, but is now meant to be a convergence level. Do not allocate all storage all the time. Allow storage to be switched on an off per refinement level (and for a single mglevel, which prompted the change above). Handle storage management with CCTK_{In,De}creaseGroupStorage instead of CCTK_{En,Dis}ableGroupStorage. darcs-hash:20050201225827-891bb-eae3b6bd092ae8d6b5e49be84c6f09f0e882933e.gz
Diffstat (limited to 'Carpet/CarpetRegrid/src/moving.cc')
-rw-r--r--Carpet/CarpetRegrid/src/moving.cc16
1 files changed, 8 insertions, 8 deletions
diff --git a/Carpet/CarpetRegrid/src/moving.cc b/Carpet/CarpetRegrid/src/moving.cc
index 0985399d5..7936865c3 100644
--- a/Carpet/CarpetRegrid/src/moving.cc
+++ b/Carpet/CarpetRegrid/src/moving.cc
@@ -20,7 +20,7 @@ namespace CarpetRegrid {
int Moving (cGH const * const cctkGH,
gh const & hh,
- gh::rexts & bbsss,
+ gh::mexts & bbsss,
gh::rbnds & obss,
gh::rprocs & pss)
{
@@ -30,8 +30,9 @@ namespace CarpetRegrid {
assert (refinement_levels >= 1);
assert (bbsss.size() >= 1);
+ vector<vector<ibbox> > bbss = bbsss.at(0);
- bbsss.resize (refinement_levels);
+ bbss.resize (refinement_levels);
obss.resize (refinement_levels);
pss.resize (refinement_levels);
@@ -40,7 +41,7 @@ namespace CarpetRegrid {
assert (! smart_outer_boundaries);
- for (size_t rl=1; rl<bbsss.size(); ++rl) {
+ for (size_t rl=1; rl<bbss.size(); ++rl) {
// calculate new extent
CCTK_REAL const argument = 2*M_PI * moving_circle_frequency * cctk_time;
@@ -63,14 +64,13 @@ namespace CarpetRegrid {
gh::cprocs ps;
SplitRegions (cctkGH, bbs, obs, ps);
- // make multigrid aware
- vector<vector<ibbox> > bbss;
- MakeMultigridBoxes (cctkGH, bbs, obs, bbss);
-
- bbsss.at(rl) = bbss;
+ bbss.at(rl) = bbs;
obss.at(rl) = obs;
pss.at(rl) = ps;
+ // make multigrid aware
+ MakeMultigridBoxes (cctkGH, bbss, obss, bbsss);
+
} // for rl
return 1;