From 921333dfb7a1a886159e648a75aef070cbe8497c Mon Sep 17 00:00:00 2001 From: schnetter Date: Thu, 23 Aug 2007 23:13:43 +0000 Subject: Check consistency of spherical surfaces at every iteration git-svn-id: http://svn.cactuscode.org/arrangements/CactusNumerical/SphericalSurface/trunk@27 40f6ab95-0e4f-0410-8daa-ee8d7420be1d --- schedule.ccl | 6 ++++++ src/check.c | 32 ++++++++++++++++++++++++++++++++ src/make.code.defn | 2 +- 3 files changed, 39 insertions(+), 1 deletion(-) create mode 100644 src/check.c diff --git a/schedule.ccl b/schedule.ccl index a4aac33..b3f5386 100644 --- a/schedule.ccl +++ b/schedule.ccl @@ -22,6 +22,12 @@ SCHEDULE GROUP SphericalSurface_HasBeenSet AT poststep { } "Set the spherical surfaces before this group, and use it afterwards" + SCHEDULE SphericalSurface_CheckState IN SphericalSurface_HasBeenSet + { + LANG: C + OPTIONS: global + } "Test the state of the spherical surfaces" + SCHEDULE SphericalSurface_Set AT poststep BEFORE SphericalSurface_HasBeenSet diff --git a/src/check.c b/src/check.c new file mode 100644 index 0000000..f1e35c4 --- /dev/null +++ b/src/check.c @@ -0,0 +1,32 @@ +/* $Header$ */ + +#include +#include +#include + +#include "cctk.h" +#include "cctk_Arguments.h" +#include "cctk_Parameters.h" + + + +void SphericalSurface_CheckState (CCTK_ARGUMENTS) +{ + DECLARE_CCTK_ARGUMENTS; + DECLARE_CCTK_PARAMETERS; + + int n; + + for (n=0; n 0 && sf_active[n] == 0) { + + CCTK_VWarn (CCTK_WARN_ABORT, __LINE__, __FILE__, CCTK_THORNSTRING, + "Surface #%d has sf_valid set to a positive value, but does " + "not have sf_active set. This is an error in the thorn " + "which calculated this surface", n); + + } + + } +} diff --git a/src/make.code.defn b/src/make.code.defn index d394b7c..e1cb6e1 100644 --- a/src/make.code.defn +++ b/src/make.code.defn @@ -2,7 +2,7 @@ # $Header$ # Source files in this directory -SRCS = radius.c setup.c +SRCS = check.c radius.c setup.c # Subdirectories containing source files SUBDIRS = -- cgit v1.2.3