From 14ff7488dc3d2014184aa69429c355bab1f294dd Mon Sep 17 00:00:00 2001 From: tradke Date: Mon, 14 Feb 2005 09:50:27 +0000 Subject: Patch from Frank Loeffler: Add ability to check for the new-style mask too. git-svn-id: http://svn.einsteintoolkit.org/cactus/EinsteinAnalysis/ADMConstraints/trunk@110 b7a48df3-cbbf-4440-997f-b4b717c9f7fc --- interface.ccl | 1 + param.ccl | 15 ++++++++++++++- src/ADMConstraints.F | 16 ++++++++++++++++ 3 files changed, 31 insertions(+), 1 deletion(-) diff --git a/interface.ccl b/interface.ccl index cd778ac..c1cc94f 100644 --- a/interface.ccl +++ b/interface.ccl @@ -7,6 +7,7 @@ friend: ADMCoupling USES INCLUDE: CalcTmunu.inc USES INCLUDE: CalcTmunu_temps.inc +USES INCLUDE: SpaceMask.h # Function aliases CCTK_INT FUNCTION Boundary_SelectVarForBC(CCTK_POINTER_TO_CONST IN GH, \ diff --git a/param.ccl b/param.ccl index e383a45..b8de448 100644 --- a/param.ccl +++ b/param.ccl @@ -47,4 +47,17 @@ REAL excised_value "Value to use for any excised regions" { *:* :: "Any value" } 0.0 - \ No newline at end of file + +BOOLEAN check_excision_bitmask "check for excision bitmask" +{ +} "no" + +string excision_mask_name "The name of the bitfield chosen for excision" +{ + :: "Anything goes" +} "Hydro_Excision" + +string excision_type_excised "The name of the type for the excised region" +{ + :: "Anything goes" +} "excised" diff --git a/src/ADMConstraints.F b/src/ADMConstraints.F index 80a5bc4..376c067 100644 --- a/src/ADMConstraints.F +++ b/src/ADMConstraints.F @@ -22,6 +22,8 @@ #include "cctk_Functions.h" #include "cctk_Parameters.h" +#include "SpaceMask.h" + subroutine ADMConstraints(CCTK_ARGUMENTS) implicit none @@ -39,6 +41,10 @@ c (for outer boundary condition) integer sw(3) logical docalc +c flags for excision + + integer ex_field, ex_type_excised + c Return code from Cactus sync routine and boundary conditions. integer ierr @@ -70,6 +76,12 @@ c Macros from Standard Einstein. c -------------------------------------------------------------- + if (check_excision_bitmask) then + call SpaceMask_GetTypeBits(ex_field, excision_mask_name) + call SpaceMask_GetStateBits(ex_type_excised, excision_mask_name, \ + excision_type_excised) + end if + sw(1) = 1 sw(2) = 1 sw(3) = 1 @@ -120,6 +132,10 @@ c Calculate constraints. if (use_mask .eq. 1) then if (abs(emask(i,j,k)-1) > 0.001) then docalc = .FALSE. + elseif (check_excision_bitmask .and. + . SpaceMask_CheckStateBitsF90(space_mask, i, j, k,\ + ex_field, ex_type_excised)) then + docalc = .FALSE. end if end if -- cgit v1.2.3