aboutsummaryrefslogtreecommitdiff
path: root/Carpet/Carpet/src/Evolve.cc
diff options
context:
space:
mode:
authorErik Schnetter <schnetter@cct.lsu.edu>2006-05-09 14:54:00 +0000
committerErik Schnetter <schnetter@cct.lsu.edu>2006-05-09 14:54:00 +0000
commit8a60e2685558ba0c00b32de7588d6c6ff5130f6a (patch)
treea80c4fce4c635c9b353503036274b11acdf4f9cd /Carpet/Carpet/src/Evolve.cc
parent52533fcd147cb13531aa4542f0ee3057d0fe1d45 (diff)
Carpet: Run the PREREGRID and POSTREGRID bins on all refinement levels
Run the PREREGRID and POSTREGRID bins on all refinement levels, even when regridding happens when no coarse grid exists at the current time. This makes it possible to change the grid hierarchy at any time. A particular regridding algorithm may or may not make use of this ability. darcs-hash:20060509145402-dae7b-1a68107901b280d4792fbee52a5d8db7f70ba760.gz
Diffstat (limited to 'Carpet/Carpet/src/Evolve.cc')
-rw-r--r--Carpet/Carpet/src/Evolve.cc9
1 files changed, 7 insertions, 2 deletions
diff --git a/Carpet/Carpet/src/Evolve.cc b/Carpet/Carpet/src/Evolve.cc
index af292ea38..c47713967 100644
--- a/Carpet/Carpet/src/Evolve.cc
+++ b/Carpet/Carpet/src/Evolve.cc
@@ -194,7 +194,10 @@ namespace Carpet {
for (int rl=0; rl<reflevels; ++rl) {
for (int ml=mglevels-1; ml>=0; --ml) {
const int do_every = maxtimereflevelfact / timereffacts.at(rl);
- if ((cgh->cctk_iteration-1) % do_every == 0) {
+ // Regridding may change coarser grids, so that postregrid has
+ // to be run on all levels. For symmetry, we also run
+ // preregrid on all levels.
+ if (true or (cgh->cctk_iteration-1) % do_every == 0) {
enter_global_mode (cgh, ml);
enter_level_mode (cgh, rl);
@@ -242,7 +245,9 @@ namespace Carpet {
for (int rl=0; rl<reflevels; ++rl) {
for (int ml=mglevels-1; ml>=0; --ml) {
const int do_every = maxtimereflevelfact / timereffacts.at(rl);
- if ((cgh->cctk_iteration-1) % do_every == 0) {
+ // Regridding may change coarser grids, so that postregrid has
+ // to be run on all levels.
+ if (true or (cgh->cctk_iteration-1) % do_every == 0) {
enter_global_mode (cgh, ml);
enter_level_mode (cgh, rl);