summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorallen <allen@17b73243-c579-4c4c-a9d2-2d5706c11dac>2000-06-26 18:51:13 +0000
committerallen <allen@17b73243-c579-4c4c-a9d2-2d5706c11dac>2000-06-26 18:51:13 +0000
commit1dda6bf9ffa523ab062342f53ceff09c482d3aa0 (patch)
tree10115a48bfa99a2cff81ec796f5acf441a3b9666
parenta855bb52af67d9540f616886866d9ca984ae40b6 (diff)
Changes to CCTK_MainLoopIndex and CCTK_SetMainLoopIndex (which now returns what the index is set to)
git-svn-id: http://svn.cactuscode.org/flesh/trunk@1705 17b73243-c579-4c4c-a9d2-2d5706c11dac
-rw-r--r--src/main/CactusDefaultEvolve.c2
-rw-r--r--src/main/MainUtils.c50
-rw-r--r--src/main/make.code.defn1
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\