diff options
-rw-r--r-- | src/main/CactusDefaultEvolve.c | 2 | ||||
-rw-r--r-- | src/main/MainUtils.c | 50 | ||||
-rw-r--r-- | src/main/make.code.defn | 1 |
3 files changed, 52 insertions, 1 deletions
diff --git a/src/main/CactusDefaultEvolve.c b/src/main/CactusDefaultEvolve.c index 056549b8..ed009925 100644 --- a/src/main/CactusDefaultEvolve.c +++ b/src/main/CactusDefaultEvolve.c @@ -67,7 +67,7 @@ static int iteration = 0; int CCTK_SetMainLoopIndex (int main_loop_index) { iteration = main_loop_index; - return 0; + return iteration; } diff --git a/src/main/MainUtils.c b/src/main/MainUtils.c new file mode 100644 index 00000000..524ddbca --- /dev/null +++ b/src/main/MainUtils.c @@ -0,0 +1,50 @@ + /*@@ + @file MainUtils.c + @date Sep 22 1999 + @author Thomas Radke, Gabrielle Allen + @desc + Utility Flesh routines + @enddesc + @version $Header$ + @@*/ + +/* the iteration counter used in the evolution loop */ +static int iteration = 0; + + + /*@@ + @routine CCTK_SetMainLoopIndex + @date Sep 22 1999 + @author Thomas Radke + @desc + Sets the iteration counter variable of the evolution loop. + This is used for recovery. + @enddesc + @calls + @calledby + +@@*/ +int CCTK_SetMainLoopIndex (int main_loop_index) +{ + iteration = main_loop_index; + return iteration; +} + + + /*@@ + @routine CCTK_MainLoopIndex + @date Sep 22 1999 + @author Thomas Radke + @desc + Returns the iteration counter variable of the evolution loop. + This is used for checkpointing. + @enddesc + @calls + @calledby + +@@*/ +int CCTK_MainLoopIndex (void) +{ + return (iteration); +} + diff --git a/src/main/make.code.defn b/src/main/make.code.defn index 00b11e89..0b4d7c59 100644 --- a/src/main/make.code.defn +++ b/src/main/make.code.defn @@ -22,6 +22,7 @@ Groups.c\ GroupsOnGH.c\ InitialiseCactus.c\ InitialiseDataStructures.c\ +MainUtils.c\ Names.c\ OverloadMain.c\ Parameters.c\ |