From a073aba5ae5ea4aacff3de11354563b84256f719 Mon Sep 17 00:00:00 2001 From: tradke Date: Mon, 15 May 2000 13:36:00 +0000 Subject: Moved the termination condition check for the main iteration loop into a separate routine DoneMainLoop(). Now parameter Cactus::cctk_itlast is really steerable. git-svn-id: http://svn.cactuscode.org/flesh/trunk@1667 17b73243-c579-4c4c-a9d2-2d5706c11dac --- src/main/CactusDefaultEvolve.c | 33 +++++++++++++++++++++++++++------ 1 file changed, 27 insertions(+), 6 deletions(-) (limited to 'src/main/CactusDefaultEvolve.c') diff --git a/src/main/CactusDefaultEvolve.c b/src/main/CactusDefaultEvolve.c index c1642da9..26552dc6 100644 --- a/src/main/CactusDefaultEvolve.c +++ b/src/main/CactusDefaultEvolve.c @@ -45,7 +45,7 @@ static int cactus_terminate_global = 0; #define TERMINATION_RAISED_BRDCAST 4 /* Local function prototypes. */ - +static int DoneMainLoop (CCTK_REAL cctk_time, int iteration); static int StepGH(cGH *GH); /* the iteration counter used in the evolution loop */ @@ -99,15 +99,13 @@ int CCTK_MainLoopIndex (void) @calls @calledby @history - + @hdate Fri May 12 2000 @hauthor Thomas Radke + @hdesc Moved evolution loop termination check into DoneMainLoop() @endhistory @@*/ int CactusDefaultEvolve(tFleshConfig *config) { - - DECLARE_CCTK_PARAMETERS - int convergence_level; #ifdef DEBUG_CCTK @@ -141,7 +139,7 @@ int CactusDefaultEvolve(tFleshConfig *config) */ - while (iterationcctk_initial_time?config->GH[0]->cctk_timeGH[0]->cctk_time, iteration)) { #ifdef DEBUG_CCTK @@ -211,6 +209,29 @@ int CactusDefaultEvolve(tFleshConfig *config) /************************************************************************/ + /*@@ + @routine DoneMainLoop + @date Fri May 12 2000 + @author Thomas Radke + @desc + Check the termination conditions for the evolution loop + @enddesc + @calls + @calledby + @history + @endhistory + +@@*/ +static int DoneMainLoop (CCTK_REAL cctk_time, int iteration) +{ + DECLARE_CCTK_PARAMETERS + + return (! (iteration < cctk_itlast || + (cctk_final_time > cctk_initial_time ? + cctk_time < cctk_final_time : 0))); +} + + /*@@ @routine StepGH @date Fri Aug 14 12:39:49 1998 -- cgit v1.2.3