From e8c774853531042cef9bc870a576b6166f1c15a5 Mon Sep 17 00:00:00 2001 From: Erik Schnetter Date: Thu, 24 May 2007 02:05:00 +0000 Subject: Carpet: Output timers for newly allocated refinement levels darcs-hash:20070524020543-dae7b-9f8e0ea390832953bcc93e4df83a7c769a336942.gz --- Carpet/Carpet/src/Evolve.cc | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) (limited to 'Carpet/Carpet/src/Evolve.cc') 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 -- cgit v1.2.3