aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgoodale <goodale@a491c6a4-70bf-4b89-8b36-d6c0cb1f094e>2002-04-26 16:23:42 +0000
committergoodale <goodale@a491c6a4-70bf-4b89-8b36-d6c0cb1f094e>2002-04-26 16:23:42 +0000
commite5ec9f325f816015b81696b9c5c6c71cda867a1a (patch)
tree624133c54d2d0c2be276d40786023a26166fd46a
parent1942a380bc36225b3c3fc638d596853249e225c1 (diff)
Mask functionality copied from old Einstein, with a bit more grdoc and
stuff. Tom git-svn-id: http://svn.cactuscode.org/arrangements/CactusNumerical/SpaceMask/trunk@4 a491c6a4-70bf-4b89-8b36-d6c0cb1f094e
-rw-r--r--param.ccl4
-rw-r--r--schedule.ccl9
-rw-r--r--src/MaskInit.c78
-rw-r--r--src/make.code.defn2
4 files changed, 92 insertions, 1 deletions
diff --git a/param.ccl b/param.ccl
index 1afcf2c..dda6aa1 100644
--- a/param.ccl
+++ b/param.ccl
@@ -1,2 +1,6 @@
# Parameter definitions for thorn SpaceMask
# $Header$
+
+BOOLEAN use_mask "Turn on storage for mask?"
+{
+} "no"
diff --git a/schedule.ccl b/schedule.ccl
index 8510074..651f1ec 100644
--- a/schedule.ccl
+++ b/schedule.ccl
@@ -1,2 +1,11 @@
# Schedule definitions for thorn SpaceMask
# $Header$
+
+if (use_mask)
+{
+ STORAGE: mask
+ schedule MaskOne at CCTK_INITIAL
+ {
+ LANG: C
+ } "Set mask to one"
+}
diff --git a/src/MaskInit.c b/src/MaskInit.c
new file mode 100644
index 0000000..2991b23
--- /dev/null
+++ b/src/MaskInit.c
@@ -0,0 +1,78 @@
+ /*@@
+ @file MaskInit.c
+ @date Fri Apr 26 17:20:13 2002
+ @author Miguel Alcubierre
+ @desc
+ Initialise the mask (I just copied LapseInits.c)
+ @enddesc
+ @version $Header$
+ @@*/
+
+#include "cctk.h"
+
+#include "cctk_Parameters.h"
+#include "cctk_Arguments.h"
+
+static const char *rcsid = "$Header$";
+
+CCTK_FILEVERSION(CactusEinstein_Einstein_MaskInit_c)
+
+
+/********************************************************************
+ ********************* Local Data Types ***********************
+ ********************************************************************/
+
+/********************************************************************
+ ********************* Local Routine Prototypes *********************
+ ********************************************************************/
+
+/********************************************************************
+ ***************** Scheduled Routine Prototypes *********************
+ ********************************************************************/
+
+void MaskOne(CCTK_ARGUMENTS);
+
+/********************************************************************
+ ********************* Other Routine Prototypes *********************
+ ********************************************************************/
+
+/********************************************************************
+ ********************* Local Data *****************************
+ ********************************************************************/
+
+/********************************************************************
+ ********************* External Routines **********************
+ ********************************************************************/
+
+ /*@@
+ @routine MaskOne
+ @date
+ @author Miguel Alcubierre
+ @desc
+ Scheduled routine to initialise the mask to one.
+ @enddesc
+ @calls
+ @calledby
+ @history
+
+ @endhistory
+
+@@*/
+void MaskOne(CCTK_ARGUMENTS)
+{
+ int i;
+ DECLARE_CCTK_ARGUMENTS
+ DECLARE_CCTK_PARAMETERS
+
+ for(i = 0; i < cctk_lsh[0]*cctk_lsh[1]*cctk_lsh[2]; i++)
+ {
+ emask[i] = 1.0;
+ }
+
+ return;
+}
+
+/********************************************************************
+ ********************* Local Routines *************************
+ ********************************************************************/
+
diff --git a/src/make.code.defn b/src/make.code.defn
index d4af37c..4a62d46 100644
--- a/src/make.code.defn
+++ b/src/make.code.defn
@@ -2,7 +2,7 @@
# $Header$
# Source files in this directory
-SRCS =
+SRCS = MaskInit.c
# Subdirectories containing source files
SUBDIRS =