aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Check.c79
-rw-r--r--src/make.code.defn3
2 files changed, 81 insertions, 1 deletions
diff --git a/src/Check.c b/src/Check.c
new file mode 100644
index 0000000..c2e921c
--- /dev/null
+++ b/src/Check.c
@@ -0,0 +1,79 @@
+ /*@@
+ @file Check.c
+ @date 19 May 2003
+ @author David Rideout
+ @desc
+ Check that the dimension of any grid variables is not greater than
+ what the faces specification can handle (currently 15).
+ @enddesc
+ @history
+ @hdate
+ @hauthor
+ @hdesc
+ @endhistory
+ @version $Header$
+ @@*/
+
+#include "cctk.h"
+#include "cctk_Arguments.h"
+
+/* the rcs ID and its dummy function to use it */
+static const char *rcsid = "$Header$";
+CCTK_FILEVERSION(CactusBase_Boundary_Check_c);
+
+/* Maximum dimension for grid variables to be selected for BC.
+ Restriction is representation of set of faces in a 32 bit signed integer. */
+#define MAX_DIM 15
+
+/********************************************************************
+ ******************** Prototypes *******************************
+ ********************************************************************/
+
+int Boundary_Check(CCTK_ARGUMENTS);
+
+/********************************************************************
+ ******************** Scheduled Routines ***********************
+ ********************************************************************/
+
+/*@@
+ @routine Boundary_Check
+ @date 19 May 2003
+ @author David Rideout
+ @desc
+ Check that the dimension of any grid variables is not greater than
+ what the faces specification can handle (currently 15).
+ @enddesc
+ @calls
+ @history
+ Note that in future versions of Cactus this will require the GH
+ passed through CCTK_ARGUMENTS.
+ @endhistory
+ @var CCTK_ARGUMENTS
+ @vdesc standard Cactus argument list
+ @vtype various
+ @vio in
+ @endvar
+ @returntype int
+ @returndesc
+ 0 success
+ -1 cactus executable contains variable group with too many
+ dimensions
+ @endreturndesc
+@@*/
+
+int Boundary_Check(CCTK_ARGUMENTS)
+{
+ DECLARE_CCTK_ARGUMENTS;
+ int retval;
+
+ retval = 0;
+ if (CCTK_MaxDim() > 15)
+ {
+ CCTK_VWarn(1, __LINE__, __FILE__, CCTK_THORNSTRING,
+ "Executable contains variable group with more than 15 "
+ "dimensions. Thorn Boundary will not function properly for "
+ "these variable groups.");
+ retval = -1;
+ }
+ return retval;
+}
diff --git a/src/make.code.defn b/src/make.code.defn
index 46bffe0..7ac414f 100644
--- a/src/make.code.defn
+++ b/src/make.code.defn
@@ -10,4 +10,5 @@ SRCS = ScalarBoundary.c\
RobinBoundary.c\
NoneBoundary.c\
Boundary.c\
- Register.c
+ Register.c\
+ Check.c