diff options
author | schnetter <schnetter@a491c6a4-70bf-4b89-8b36-d6c0cb1f094e> | 2005-09-26 00:44:12 +0000 |
---|---|---|
committer | schnetter <schnetter@a491c6a4-70bf-4b89-8b36-d6c0cb1f094e> | 2005-09-26 00:44:12 +0000 |
commit | 383661c143028379377dd778fd362e1b6585f8cc (patch) | |
tree | 91386e25675a2743794090eeb28223dc280ba7e1 /src/MaskInit.c | |
parent | 7e93921cbc6a5e323a442a9982580e46b7813737 (diff) |
Introduce a new schedule group ADMBase_InitialGauge which is run just
after ADMBase_InitialData. This makes it possible to set up all ADM
data in these two groups, and then e.g. convert to the BSSN variables
after these groups still in the bin "initial". Various other thorns,
such as dissipation or multipatch, can now apply transformations to
the initial data in the bin "postinitial". This simplifies the
interaction between various thorns.
Change various thorns to use these two groups.
git-svn-id: http://svn.cactuscode.org/arrangements/CactusNumerical/SpaceMask/trunk@51 a491c6a4-70bf-4b89-8b36-d6c0cb1f094e
Diffstat (limited to 'src/MaskInit.c')
-rw-r--r-- | src/MaskInit.c | 36 |
1 files changed, 35 insertions, 1 deletions
diff --git a/src/MaskInit.c b/src/MaskInit.c index 2066e2b..b4f8663 100644 --- a/src/MaskInit.c +++ b/src/MaskInit.c @@ -8,6 +8,8 @@ @version $Header$ @@*/ +#include <math.h> +#include <stdio.h> #include <stdlib.h> #include "cctk.h" @@ -125,7 +127,7 @@ void MaskSym_emask(CCTK_ARGUMENTS) void MaskOne(CCTK_ARGUMENTS) { int i; - DECLARE_CCTK_ARGUMENTS + DECLARE_CCTK_ARGUMENTS; for(i = 0; i < cctk_lsh[0]*cctk_lsh[1]*cctk_lsh[2]; i++) { @@ -136,6 +138,38 @@ void MaskOne(CCTK_ARGUMENTS) } /*@@ + @routine CheckMask + @date + @author Erik Schnetter + @desc + Ensure that all mask values are legal. + @enddesc + @calls + @calledby + @history + + @endhistory + +@@*/ +void CheckMask(CCTK_ARGUMENTS) +{ + DECLARE_CCTK_ARGUMENTS + int i; + + for(i = 0; i < cctk_lsh[0]*cctk_lsh[1]*cctk_lsh[2]; i++) + { + if ( fabs(emask[i] - 1.0) > 1.0e-12 + && fabs(emask[i] - 0.5) > 1.0e-12 + && fabs(emask[i] - 0.0) > 1.0e-12) + { + CCTK_VWarn (1, __LINE__, __FILE__, CCTK_THORNSTRING, + "Illegal mask value %g detected at grid point %d", + (double)emask[i], i); + } + } +} + +/*@@ @routine MaskZero @date @author Denis Pollney |