summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/include/cctk_Termination.h14
-rw-r--r--src/main/Termination.c81
2 files changed, 41 insertions, 54 deletions
diff --git a/src/include/cctk_Termination.h b/src/include/cctk_Termination.h
index cb223ebe..2f5135db 100644
--- a/src/include/cctk_Termination.h
+++ b/src/include/cctk_Termination.h
@@ -2,24 +2,24 @@
@header cctk_Termination.h
@date Tue 24 Apr 2001
@author Thomas Radke
- @desc
+ @desc
Prototypes of CCTK termination functions.
- @enddesc
+ @enddesc
@version $Header$
@@*/
#ifndef _CCTK_TERMINATION_H_
#define _CCTK_TERMINATION_H_ 1
-#ifdef __cplusplus
-extern "C"
+#ifdef __cplusplus
+extern "C"
{
#endif
-int CCTK_TerminationReached (cGH *GH);
-void CCTK_TerminateNext (cGH *GH);
+int CCTK_TerminationReached (const cGH *GH);
+void CCTK_TerminateNext (const cGH *GH);
-#ifdef __cplusplus
+#ifdef __cplusplus
}
#endif
diff --git a/src/main/Termination.c b/src/main/Termination.c
index be317acf..785a4ab8 100644
--- a/src/main/Termination.c
+++ b/src/main/Termination.c
@@ -2,40 +2,26 @@
@file Termination.c
@date Thu March 15 7pm
@author Gabrielle Allen
- @desc
- Termination conditions
- @enddesc
- @version $Header$
+ @desc
+ Termination conditions
+ @enddesc
+ @version $Id$
@@*/
-#include <stdio.h>
-#include <stdlib.h>
-
#include "cctk_Flesh.h"
-#include "cctk_Parameter.h"
-
-#include "cctk_Main.h"
-#include "cctk_IO.h"
+#include "cctk_Termination.h"
static const char *rcsid="$Header$";
CCTK_FILEVERSION(main_Termination_c)
/********************************************************************
- ********************* Local Data Types ***********************
- ********************************************************************/
-
-/********************************************************************
********************* Local Data *****************************
********************************************************************/
static int termination_reached = 0;
/********************************************************************
- ********************* Local Routine Prototypes *********************
- ********************************************************************/
-
-/********************************************************************
********************* External Routines **********************
********************************************************************/
@@ -43,43 +29,44 @@ static int termination_reached = 0;
@routine CCTK_TerminationReached
@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
+ @desc
+ Returns true if Cactus will terminate on the next iteration.
+ @enddesc
+ @var GH
+ @vdesc pointer to CCTK grid hierarchy
+ @vtype const cGH *
+ @vio in
+ @endvar
+ @returntype int
+ @returndesc
+ true (1) or false (0)
+ @endreturndesc
@@*/
-int CCTK_TerminationReached(cGH *GH)
+int CCTK_TerminationReached (const cGH *GH)
{
- return termination_reached;
+ GH = GH;
+
+ return (termination_reached);
}
-
+
+
/*@@
@routine CCTK_TerminateNext
@date Thu March 15 7pm
@author Gabrielle Allen
- @desc
- Sets termination for next iteration
- @enddesc
- @calls
- @calledby
- @history
- @hdate @hauthor
- @hdesc
- @endhistory
-
+ @desc
+ Sets termination for next iteration.
+ @enddesc
+ @var GH
+ @vdesc pointer to CCTK grid hierarchy
+ @vtype const cGH *
+ @vio in
+ @endvar
@@*/
-void CCTK_TerminateNext(cGH *GH)
+void CCTK_TerminateNext (const cGH *GH)
{
+ GH = GH;
+
termination_reached = 1;
}
-
-/********************************************************************
- ********************* Local Routines *************************
- ********************************************************************/
-