From 69594ec9302a4787bcf82ebe22873a84dc45c15f Mon Sep 17 00:00:00 2001 From: eschnett Date: Sat, 13 Apr 2013 22:31:17 +0000 Subject: Set InLastMoLPostStep during initial data setup The previous code accessed MoL_Intermediate_Step, which is undefined during initial data setup. git-svn-id: http://svn.einsteintoolkit.org/cactus/EinsteinEvolve/GRHydro/trunk@506 c83d129a-5a75-4d5a-9c4d-ed3a5855bf45 --- src/GRHydro_LastMoLPostStep.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/GRHydro_LastMoLPostStep.c b/src/GRHydro_LastMoLPostStep.c index 1ccc4b4..9e11f5a 100644 --- a/src/GRHydro_LastMoLPostStep.c +++ b/src/GRHydro_LastMoLPostStep.c @@ -27,7 +27,8 @@ void GRHydro_SetLastMoLPostStep(CCTK_ARGUMENTS) } // If counter becomes zero, the only thing left to do is to call PostStep! - if (*MoL_Intermediate_Step == 0) + // NOTE: MoL's counter is uninitialised during initial data setup! + if (cctk_iteration == 0 || *MoL_Intermediate_Step == 0) *InLastMoLPostStep = 1; else *InLastMoLPostStep = 0; -- cgit v1.2.3