aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorgoodale <goodale@c78560ca-4b45-4335-b268-5f3340f3cb52>1999-10-07 15:27:32 +0000
committergoodale <goodale@c78560ca-4b45-4335-b268-5f3340f3cb52>1999-10-07 15:27:32 +0000
commitfae25b1b8b278e91633c868400a5ef9b2ab353d1 (patch)
tree12002bd2c10169d3dced453d00c8c1c7f61b6759 /src
parent0eadce2e71ea35d15ed3872b4d42090276a033ce (diff)
C version of the parameter checking routine.
Passes test suite on Linux if compiled in. Tom git-svn-id: http://svn.cactuscode.org/arrangements/CactusBase/CartGrid3D/trunk@63 c78560ca-4b45-4335-b268-5f3340f3cb52
Diffstat (limited to 'src')
-rw-r--r--src/ParamCheck.c95
1 files changed, 95 insertions, 0 deletions
diff --git a/src/ParamCheck.c b/src/ParamCheck.c
new file mode 100644
index 0000000..e893fd5
--- /dev/null
+++ b/src/ParamCheck.c
@@ -0,0 +1,95 @@
+ /*@@
+ @file ParamCheck.c
+ @date Thu Oct 7 17:11:44 1999
+ @author Tom Goodale
+ @desc
+ C version of Gab's paramcheck stuff
+ @enddesc
+ @@*/
+
+static char *rcsid = "$Header$";
+
+#include "cctk.h"
+#include "cctk_arguments.h"
+#include "cctk_parameters.h"
+
+
+ /*@@
+ @routine ParamCheckCartGrid3D
+ @date Tue Feb 23 1999
+ @author Gabrielle Allen
+ @desc
+ Check parameters for CartGrid3D
+ @enddesc
+ @calls
+ @calledby
+ @history
+ @hdate Thu Oct 7 17:23:15 1999 @hauthor Tom Goodale
+ @hdesc Converted to C
+ @endhistory
+
+@@*/
+void ParamCheck_CartGrid3D(CCTK_CARGUMENTS)
+{
+ DECLARE_CCTK_CARGUMENTS
+ DECLARE_CCTK_PARAMETERS
+
+ int iflag;
+
+ iflag = 0;
+
+ if (CCTK_Equals(type,"byrange"))
+ {
+ if (CCTK_Equals(domain,"octant"))
+ {
+ iflag++;
+ }
+ else if (CCTK_Equals(domain,"quadrant"))
+ {
+ iflag++;
+ }
+ else if (CCTK_Equals(domain,"bitant"))
+ {
+ iflag++;
+ }
+ else if (CCTK_Equals(domain,"full"))
+ {
+ iflag++;
+ }
+
+ }
+ else if (CCTK_Equals(type,"byspacing"))
+ {
+ if (CCTK_Equals(domain,"bitant"))
+ {
+ iflag++;
+ }
+ else if (CCTK_Equals(domain,"quadrant"))
+ {
+ iflag++;
+ } else if (CCTK_Equals(domain,"octant"))
+ {
+ iflag++;
+ }
+ else if (CCTK_Equals(domain,"full"))
+ {
+ iflag++;
+ }
+ }
+ else if (CCTK_Equals(type,"box"))
+ {
+ iflag++;
+
+ if (!CCTK_Equals(domain,"full")) CCTK_PARAMWARN("No symmetries can be used with box grid");
+ }
+
+ /* No grid was set up */
+
+ if (iflag != 1)
+ {
+ CCTK_PARAMWARN("No grid set up in CartGrid3D");
+ }
+
+ return;
+}
+