From 6895019699c8d2730e0d795b33e46ded6a29eb9f Mon Sep 17 00:00:00 2001 From: allen Date: Mon, 4 Jun 2001 18:20:15 +0000 Subject: 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 --- schedule.ccl | 5 +++++ src/Given.c | 2 +- src/Initialise.c | 31 +++++++++++++++++++++++++++++++ src/make.code.defn | 2 +- 4 files changed, 38 insertions(+), 2 deletions(-) create mode 100644 src/Initialise.c 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 + +#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 = -- cgit v1.2.3