aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErik Schnetter <schnetter@gmail.com>2012-10-24 18:03:32 -0400
committerErik Schnetter <schnetter@gmail.com>2012-10-24 18:03:32 -0400
commit8fa6d4295808449d3e7e8f687c806ce7cebde2e3 (patch)
tree33617d2f908f257621144044542d0b0bd3697c0f
parent911d93503f33de2596f8aeb3f2f9dc73afdba318 (diff)
Carpet: Execute CPINITIAL only after initial data setup, not after recovering
-rw-r--r--Carpet/Carpet/src/Initialise.cc16
1 files 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;