summaryrefslogtreecommitdiff
path: root/src/main/Termination.c
diff options
context:
space:
mode:
authorallen <allen@17b73243-c579-4c4c-a9d2-2d5706c11dac>2001-03-16 13:52:23 +0000
committerallen <allen@17b73243-c579-4c4c-a9d2-2d5706c11dac>2001-03-16 13:52:23 +0000
commit2dc28e2a7354e04fa9a5f879e658f8b1f85755ec (patch)
tree4705efae1ef48ce7fd10010dc5ef5b35516bf242 /src/main/Termination.c
parent029e537926d48b385bf9b0508b2c914b71867b4e (diff)
Routines for handling termination conditions, only basic stuff for now.
git-svn-id: http://svn.cactuscode.org/flesh/trunk@2079 17b73243-c579-4c4c-a9d2-2d5706c11dac
Diffstat (limited to 'src/main/Termination.c')
-rw-r--r--src/main/Termination.c85
1 files changed, 85 insertions, 0 deletions
diff --git a/src/main/Termination.c b/src/main/Termination.c
new file mode 100644
index 00000000..a8914031
--- /dev/null
+++ b/src/main/Termination.c
@@ -0,0 +1,85 @@
+ /*@@
+ @file Termination.c
+ @date Thu March 15 7pm
+ @author Gabrielle Allen
+ @desc
+ Termination conditions
+ @enddesc
+ @version $Header$
+ @@*/
+
+#include <stdio.h>
+#include <stdlib.h>
+
+#include "cctk_Flesh.h"
+#include "cctk_Parameter.h"
+
+#include "cctk_Main.h"
+#include "cctk_IO.h"
+
+static char *rcsid="$Header$";
+
+CCTK_FILEVERSION(main_Termination_c)
+
+/********************************************************************
+ ********************* Local Data Types ***********************
+ ********************************************************************/
+
+/********************************************************************
+ ********************* Local Data *****************************
+ ********************************************************************/
+
+static int termination_reached = 0;
+
+/********************************************************************
+ ********************* Local Routine Prototypes *********************
+ ********************************************************************/
+
+/********************************************************************
+ ********************* External Routines **********************
+ ********************************************************************/
+
+ /*@@
+ @routine CCTK_TerminationReached(cGH *)
+ @date Thu March 15 7pm
+ @author Gabrielle Allen
+ @desc
+ Returns true if Cactus will terminate on the next iteration
+ @enddesc
+ @calls
+ @calledby
+ @history
+ @hdate @hauthor
+ @hdesc
+ @endhistory
+
+@@*/
+int CCTK_TerminationReached(cGH *GH)
+{
+ return termination_reached;
+}
+
+ /*@@
+ @routine CCTK_TerminateNext(cGH *)
+ @date Thu March 15 7pm
+ @author Gabrielle Allen
+ @desc
+ Sets termination for next iteration
+ @enddesc
+ @calls
+ @calledby
+ @history
+ @hdate @hauthor
+ @hdesc
+ @endhistory
+
+@@*/
+int CCTK_TerminateNext(cGH *GH)
+{
+ termination_reached = 1;
+}
+
+/********************************************************************
+ ********************* Local Routines *************************
+ ********************************************************************/
+