aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorallen <allen@5633253d-7678-4964-a54d-f87795f8ee59>2001-06-04 18:20:15 +0000
committerallen <allen@5633253d-7678-4964-a54d-f87795f8ee59>2001-06-04 18:20:15 +0000
commit6895019699c8d2730e0d795b33e46ded6a29eb9f (patch)
tree106d265e43e37ba77b27e2c5cb702731360f2ac7
parente8c64c8986d812be0ccb81c22409387e2d7c44cc (diff)
Initialise grid scalars to zero so they don't error with NaNChecker
git-svn-id: http://svn.cactuscode.org/arrangements/CactusBase/Time/trunk@37 5633253d-7678-4964-a54d-f87795f8ee59
-rw-r--r--schedule.ccl5
-rw-r--r--src/Given.c2
-rw-r--r--src/Initialise.c31
-rw-r--r--src/make.code.defn2
4 files changed, 38 insertions, 2 deletions
diff --git a/schedule.ccl b/schedule.ccl
index 343bede..419a3a2 100644
--- a/schedule.ccl
+++ b/schedule.ccl
@@ -1,6 +1,11 @@
# Schedule definitions for thorn Time
# $Header$
+schedule Time_Initialise at CCTK_BASEGRID before (Time_Simple, Time_Given)
+{
+ LANG: C
+} "Initialise Time variables"
+
if (CCTK_Equals(timestep_method,"courant_static"))
{
schedule Time_Simple at CCTK_BASEGRID after SpatialCoordinates
diff --git a/src/Given.c b/src/Given.c
index 7473c67..3e11976 100644
--- a/src/Given.c
+++ b/src/Given.c
@@ -1,5 +1,5 @@
/*@@
- @file Simple.c
+ @file Given.c
@date September 4 1999
@author Gabrielle Allen
@desc
diff --git a/src/Initialise.c b/src/Initialise.c
new file mode 100644
index 0000000..a19af4d
--- /dev/null
+++ b/src/Initialise.c
@@ -0,0 +1,31 @@
+ /*@@
+ @file Initialise.c
+ @date May 12 2001
+ @author Gabrielle Allen
+ @desc
+ Initialise grid variables
+ @enddesc
+ @@*/
+
+#include <stdlib.h>
+
+#include "cctk.h"
+#include "cctk_Arguments.h"
+
+static const char *rcsid = "$Header$";
+
+CCTK_FILEVERSION(CactusBase_Time_Initialise_c)
+
+void Time_Initialise(CCTK_ARGUMENTS);
+
+void Time_Initialise(CCTK_ARGUMENTS)
+{
+ DECLARE_CCTK_ARGUMENTS
+
+ *courant_wave_speed = 0;
+ *courant_min_time = 0;
+ *courant_dt = 0;
+}
+
+
+
diff --git a/src/make.code.defn b/src/make.code.defn
index 4571048..785b511 100644
--- a/src/make.code.defn
+++ b/src/make.code.defn
@@ -2,7 +2,7 @@
# $Header$
# Source files in this directory
-SRCS = Simple.c Courant.c Given.c
+SRCS = Simple.c Courant.c Given.c Initialise.c
# Subdirectories containing source files
SUBDIRS =