aboutsummaryrefslogtreecommitdiff
path: root/Carpet/Carpet/src/Evolve.cc
diff options
context:
space:
mode:
authorErik Schnetter <schnetter@cct.lsu.edu>2007-05-24 02:05:00 +0000
committerErik Schnetter <schnetter@cct.lsu.edu>2007-05-24 02:05:00 +0000
commite8c774853531042cef9bc870a576b6166f1c15a5 (patch)
treed967e02a7ce7f653cbc0a23a0ce1c8fd37c7ee2e /Carpet/Carpet/src/Evolve.cc
parent2f6cf0a22465bb1db16b97fbb8a233d8131fa763 (diff)
Carpet: Output timers for newly allocated refinement levels
darcs-hash:20070524020543-dae7b-9f8e0ea390832953bcc93e4df83a7c769a336942.gz
Diffstat (limited to 'Carpet/Carpet/src/Evolve.cc')
-rw-r--r--Carpet/Carpet/src/Evolve.cc28
1 files changed, 16 insertions, 12 deletions
diff --git a/Carpet/Carpet/src/Evolve.cc b/Carpet/Carpet/src/Evolve.cc
index 39568bc89..2b02de5f9 100644
--- a/Carpet/Carpet/src/Evolve.cc
+++ b/Carpet/Carpet/src/Evolve.cc
@@ -59,15 +59,16 @@ namespace Carpet {
timer.start();
while (not do_terminate (cctkGH)) {
- int const do_every = maxtimereflevelfact / timereffacts.at(reflevels-1);
-
AdvanceTime (cctkGH);
- if ((cctkGH->cctk_iteration - 1) % do_every == 0) {
- ENTER_GLOBAL_MODE (cctkGH, 0) {
- BEGIN_REFLEVEL_LOOP (cctkGH) {
- CallRegrid (cctkGH);
- } END_REFLEVEL_LOOP;
- } LEAVE_GLOBAL_MODE;
+ {
+ int const do_every = maxtimereflevelfact / timereffacts.at(reflevels-1);
+ if ((cctkGH->cctk_iteration - 1) % do_every == 0) {
+ ENTER_GLOBAL_MODE (cctkGH, 0) {
+ BEGIN_REFLEVEL_LOOP (cctkGH) {
+ CallRegrid (cctkGH);
+ } END_REFLEVEL_LOOP;
+ } LEAVE_GLOBAL_MODE;
+ }
}
CallEvol (cctkGH);
CallRestrict (cctkGH);
@@ -75,11 +76,14 @@ namespace Carpet {
print_internal_data ();
// Print timer values
- if (output_timers_every > 0 and
- cctkGH->cctk_iteration % output_timers_every == 0 and
- cctkGH->cctk_iteration % do_every == 0)
{
- TimerSet::writeData (cctkGH, timer_file);
+ int const do_every = maxtimereflevelfact / timereffacts.at(reflevels-1);
+ if (output_timers_every > 0 and
+ cctkGH->cctk_iteration % output_timers_every == 0 and
+ cctkGH->cctk_iteration % do_every == 0)
+ {
+ TimerSet::writeData (cctkGH, timer_file);
+ }
}
} // end main loop