From 8fa6d4295808449d3e7e8f687c806ce7cebde2e3 Mon Sep 17 00:00:00 2001 From: Erik Schnetter Date: Wed, 24 Oct 2012 18:03:32 -0400 Subject: Carpet: Execute CPINITIAL only after initial data setup, not after recovering --- Carpet/Carpet/src/Initialise.cc | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/Carpet/Carpet/src/Initialise.cc b/Carpet/Carpet/src/Initialise.cc index 86ca66bc2..f4b6926f6 100644 --- a/Carpet/Carpet/src/Initialise.cc +++ b/Carpet/Carpet/src/Initialise.cc @@ -42,7 +42,7 @@ namespace Carpet { static void CallInitial (cGH * cctkGH); static void CallRestrict (cGH * cctkGH); static void CallPostInitial (cGH * cctkGH); - static void CallAnalysis (cGH * cctkGH); + static void CallAnalysis (cGH * cctkGH, bool did_recover); static void Initialise3tl (cGH * cctkGH); @@ -131,7 +131,7 @@ namespace Carpet { } // Analyse initial data - CallAnalysis (cctkGH); + CallAnalysis (cctkGH, fc->recovered); print_internal_data (); timer.stop(); @@ -581,7 +581,7 @@ namespace Carpet { void - CallAnalysis (cGH * const cctkGH) + CallAnalysis (cGH * const cctkGH, bool const did_recover) { char const * const where = "CallAnalysis"; static Timer timer (where); @@ -606,10 +606,12 @@ namespace Carpet { int const do_every = ipow(mgfact, mglevel) * (maxtimereflevelfact / timereffacts.AT(rl)); - if (cctkGH->cctk_iteration % do_every == 0) - { - // Checkpoint - ScheduleTraverse (where, "CCTK_CPINITIAL", cctkGH); + if (cctkGH->cctk_iteration % do_every == 0) { + + if (not did_recover) { + // Checkpoint, but only if we did not recover + ScheduleTraverse (where, "CCTK_CPINITIAL", cctkGH); + } // Analysis in_analysis_bin = true; -- cgit v1.2.3