aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorknarf <knarf@c83d129a-5a75-4d5a-9c4d-ed3a5855bf45>2011-11-01 23:21:17 +0000
committerknarf <knarf@c83d129a-5a75-4d5a-9c4d-ed3a5855bf45>2011-11-01 23:21:17 +0000
commit4e314658696c0d299afdb7fbdc8d6e3eef65a64c (patch)
tree5f9680de2cdee804ab3991d36349559a94384264
parent5689d98830f1f37bbd2a8bab4e0807b5c1d9af60 (diff)
dump the atmosphere bitmask in favor of the atmosphere integer mask which is used/allocated already anyway
git-svn-id: http://svn.einsteintoolkit.org/cactus/EinsteinEvolve/GRHydro/trunk@292 c83d129a-5a75-4d5a-9c4d-ed3a5855bf45
-rw-r--r--schedule.ccl6
-rw-r--r--src/GRHydro_CalcUpdate.F9033
-rw-r--r--src/GRHydro_Con2Prim.F9037
-rw-r--r--src/GRHydro_Con2PrimM.F9037
-rw-r--r--src/GRHydro_RegisterMask.c21
-rw-r--r--src/GRHydro_UpdateMask.F9064
-rw-r--r--src/GRHydro_UpdateMaskM.F9026
7 files changed, 24 insertions, 200 deletions
diff --git a/schedule.ccl b/schedule.ccl
index 208648b..8005d7e 100644
--- a/schedule.ccl
+++ b/schedule.ccl
@@ -496,11 +496,6 @@ if (wk_atmosphere)
} "Set the atmosphere mask"
}
-schedule GRHydro_SetupDescriptors AT CCTK_Initial BEFORE HydroBase_Initial
-{
- LANG: C
-} "Get and store the mask descriptors"
-
# If using mesh refinement
@@ -1140,3 +1135,4 @@ if (CCTK_Equals(Bvec_evolution_method,"GRHydro"))
schedule GROUP SetTmunu AT POSTPOSTINITIAL AFTER Con2Prim BEFORE ADMConstraintsGroup
{
} "Calculate the stress-energy tensor"
+
diff --git a/src/GRHydro_CalcUpdate.F90 b/src/GRHydro_CalcUpdate.F90
index cbf1508..fffb42d 100644
--- a/src/GRHydro_CalcUpdate.F90
+++ b/src/GRHydro_CalcUpdate.F90
@@ -41,14 +41,6 @@ subroutine UpdateCalculation(CCTK_ARGUMENTS)
CCTK_INT :: i,j,k,itracer
CCTK_REAL :: idx, alp_l, alp_r, Bvec_l, Bvec_r
- CCTK_INT :: type_bits, atmosphere, not_atmosphere
-
- call SpaceMask_GetTypeBits(type_bits, "Hydro_Atmosphere")
- call SpaceMask_GetStateBits(atmosphere, "Hydro_Atmosphere",&
- "in_atmosphere")
- call SpaceMask_GetStateBits(not_atmosphere, "Hydro_Atmosphere",&
- "not_in_atmosphere")
-
idx = 1.d0 / CCTK_DELTA_SPACE(flux_direction)
if (CCTK_EQUALS(method_type, "RSA FV")) then
@@ -127,28 +119,19 @@ subroutine UpdateCalculation(CCTK_ARGUMENTS)
if (wk_atmosphere .eq. 1) then
- if ( (atmosphere_mask(i,j,k) .eq. 1) .or. &
- (SpaceMask_CheckStateBitsF90(space_mask,i,j,k,type_bits,atmosphere)) ) then
+ if (atmosphere_mask(i,j,k) .ne. 0) then
!!$ We are in the atmosphere so the momentum flux must vanish
srhs(i,j,k,:) = 0.d0
- if ( ( (atmosphere_mask(i-1,j ,k ) .eq. 1) .and. &
- (atmosphere_mask(i+1,j ,k ) .eq. 1) .and. &
- (atmosphere_mask(i ,j-1,k ) .eq. 1) .and. &
- (atmosphere_mask(i ,j+1,k ) .eq. 1) .and. &
- (atmosphere_mask(i ,j ,k-1) .eq. 1) .and. &
- (atmosphere_mask(i ,j ,k+1) .eq. 1) &
- ) .or. &
- ( (SpaceMask_CheckStateBitsF90(space_mask,i-1,j ,k ,type_bits,atmosphere)) .and. &
- (SpaceMask_CheckStateBitsF90(space_mask,i+1,j ,k ,type_bits,atmosphere)) .and. &
- (SpaceMask_CheckStateBitsF90(space_mask,i ,j-1,k ,type_bits,atmosphere)) .and. &
- (SpaceMask_CheckStateBitsF90(space_mask,i ,j+1,k ,type_bits,atmosphere)) .and. &
- (SpaceMask_CheckStateBitsF90(space_mask,i ,j ,k-1,type_bits,atmosphere)) .and. &
- (SpaceMask_CheckStateBitsF90(space_mask,i ,j ,k+1,type_bits,atmosphere)) &
- ) &
- ) then
+ if ( (atmosphere_mask(i-1,j ,k ) .ne. 0) .and. &
+ (atmosphere_mask(i+1,j ,k ) .ne. 0) .and. &
+ (atmosphere_mask(i ,j-1,k ) .ne. 0) .and. &
+ (atmosphere_mask(i ,j+1,k ) .ne. 0) .and. &
+ (atmosphere_mask(i ,j ,k-1) .ne. 0) .and. &
+ (atmosphere_mask(i ,j ,k+1) .ne. 0) &
+ ) then
!!$ All neighbours are also atmosphere so all rhs vanish
diff --git a/src/GRHydro_Con2Prim.F90 b/src/GRHydro_Con2Prim.F90
index 89a6dda..550e2bd 100644
--- a/src/GRHydro_Con2Prim.F90
+++ b/src/GRHydro_Con2Prim.F90
@@ -61,9 +61,6 @@ subroutine Conservative2Primitive(CCTK_ARGUMENTS)
logical :: epsnegative
character*256 :: warnline
- CCTK_INT :: type_bits, atmosphere
- CCTK_INT :: type2_bits
-
CCTK_REAL :: local_min_tracer
CCTK_REAL :: local_perc_ptol
@@ -98,10 +95,6 @@ subroutine Conservative2Primitive(CCTK_ARGUMENTS)
vup => vel
end if
- call SpaceMask_GetTypeBits(type_bits, "Hydro_Atmosphere")
- call SpaceMask_GetStateBits(atmosphere, "Hydro_Atmosphere", "in_atmosphere")
- type2_bits = -1
-
nx = cctk_lsh(1)
ny = cctk_lsh(2)
nz = cctk_lsh(3)
@@ -126,7 +119,7 @@ subroutine Conservative2Primitive(CCTK_ARGUMENTS)
do i = 1, nx
!do not compute if in atmosphere or in excised region
- if (SpaceMask_CheckStateBitsF90(space_mask, i, j, k, type_bits, atmosphere) .or. &
+ if ((atmosphere_mask(i,j,k) .ne. 0) .or. &
(hydro_excision_mask(i,j,k) .ne. 0)) cycle
epsnegative = .false.
@@ -1041,9 +1034,6 @@ subroutine Conservative2PrimitiveBounds(CCTK_ARGUMENTS)
logical :: epsnegative
character(len=100) warnline
- CCTK_INT :: type_bits, atmosphere
- CCTK_INT :: type2_bits
-
CCTK_REAL :: local_min_tracer
! save memory when MP is not used
@@ -1081,11 +1071,6 @@ subroutine Conservative2PrimitiveBounds(CCTK_ARGUMENTS)
call EOS_Omni_EpsFromPress(GRHydro_polytrope_handle,keytemp,GRHydro_eos_rf_prec,n,&
GRHydro_rho_min,epsmin,xtemp,xye,pmin,epsmin,keyerr,anyerr)
-
- call SpaceMask_GetTypeBits(type_bits, "Hydro_Atmosphere")
- call SpaceMask_GetStateBits(atmosphere, "Hydro_Atmosphere", "in_atmosphere")
- type2_bits = -1
-
nx = cctk_lsh(1)
ny = cctk_lsh(2)
nz = cctk_lsh(3)
@@ -1101,7 +1086,7 @@ subroutine Conservative2PrimitiveBounds(CCTK_ARGUMENTS)
do i = GRHydro_stencil, nx - GRHydro_stencil + 1
!do not compute if in atmosphere or in an excised region
- if (SpaceMask_CheckStateBitsF90(space_mask, i, j, k, type_bits, atmosphere) .or. &
+ if ((atmosphere_mask(i,j,k) .ne. 0) .or. &
GRHydro_enable_internal_excision /= 0 .and. (hydro_excision_mask(i,j,k) .ne. 0)) cycle
gxxl = 0.5d0 * (g11(i,j,k) + g11(i-xoffset,j-yoffset,k-zoffset))
@@ -1278,9 +1263,6 @@ subroutine Conservative2PrimitivePolytype(CCTK_ARGUMENTS)
integer :: i, j, k, itracer, nx, ny, nz
CCTK_REAL :: uxx, uxy, uxz, uyy, uyz, uzz, det
- CCTK_INT :: type_bits, atmosphere
- CCTK_INT :: type2_bits
-
CCTK_REAL :: local_min_tracer
! character(len=400) :: warnline
@@ -1309,10 +1291,6 @@ subroutine Conservative2PrimitivePolytype(CCTK_ARGUMENTS)
end if
- call SpaceMask_GetTypeBits(type_bits, "Hydro_Atmosphere")
- call SpaceMask_GetStateBits(atmosphere, "Hydro_Atmosphere", "in_atmosphere")
- type2_bits = -1
-
nx = cctk_lsh(1)
ny = cctk_lsh(2)
nz = cctk_lsh(3)
@@ -1334,7 +1312,7 @@ subroutine Conservative2PrimitivePolytype(CCTK_ARGUMENTS)
do i = 1, nx
!do not compute if in atmosphere or in an excised region
- if (SpaceMask_CheckStateBitsF90(space_mask, i, j, k, type_bits, atmosphere) .or. &
+ if ((atmosphere_mask(i,j,k) .ne. 0) .or. &
GRHydro_enable_internal_excision /= 0 .and. (hydro_excision_mask(i,j,k) .ne. 0)) cycle
det = SPATIAL_DETERMINANT(g11(i,j,k),g12(i,j,k),g13(i,j,k),\
@@ -1672,9 +1650,6 @@ subroutine Con2PrimBoundsPolytype(CCTK_ARGUMENTS)
CCTK_REAL :: gxxl,gxyl,gxzl,gyyl,gyzl,gzzl,avg_detl,&
gxxr,gxyr,gxzr,gyyr,gyzr,gzzr,avg_detr
- CCTK_INT :: type_bits, atmosphere
- CCTK_INT :: type2_bits
-
! save memory when MP is not used
CCTK_INT :: GRHydro_UseGeneralCoordinates
CCTK_REAL, DIMENSION(:,:,:), POINTER :: g11, g12, g13, g22, g23, g33
@@ -1695,10 +1670,6 @@ subroutine Con2PrimBoundsPolytype(CCTK_ARGUMENTS)
g33 => gzz
end if
- call SpaceMask_GetTypeBits(type_bits, "Hydro_Atmosphere")
- call SpaceMask_GetStateBits(atmosphere, "Hydro_Atmosphere", "in_atmosphere")
- type2_bits = -1
-
nx = cctk_lsh(1)
ny = cctk_lsh(2)
nz = cctk_lsh(3)
@@ -1708,7 +1679,7 @@ subroutine Con2PrimBoundsPolytype(CCTK_ARGUMENTS)
do i = GRHydro_stencil, nx - GRHydro_stencil + 1
!do not compute if in atmosphere or in an excised region
- if (SpaceMask_CheckStateBitsF90(space_mask, i, j, k, type_bits, atmosphere) .or. &
+ if ((atmosphere_mask(i,j,k) .ne. 0) .or. &
GRHydro_enable_internal_excision /= 0 .and. (hydro_excision_mask(i,j,k) .ne. 0)) cycle
gxxl = 0.5d0 * (g11(i,j,k) + g11(i-xoffset,j-yoffset,k-zoffset))
diff --git a/src/GRHydro_Con2PrimM.F90 b/src/GRHydro_Con2PrimM.F90
index 2764739..43c8374 100644
--- a/src/GRHydro_Con2PrimM.F90
+++ b/src/GRHydro_Con2PrimM.F90
@@ -55,9 +55,6 @@ subroutine Conservative2PrimitiveM(CCTK_ARGUMENTS)
CCTK_INT :: epsnegative
character(len=100) warnline
- CCTK_INT :: type_bits, atmosphere
- CCTK_INT :: type2_bits
-
CCTK_REAL :: local_min_tracer, local_gam, local_pgam,local_K,sc
! begin EOS Omni vars
@@ -67,10 +64,6 @@ subroutine Conservative2PrimitiveM(CCTK_ARGUMENTS)
xpress=0.0d0;xtemp=0.0d0;xye=0.0d0;xeps=0.0d0
! end EOS Omni vars
- call SpaceMask_GetTypeBits(type_bits, "Hydro_Atmosphere")
- call SpaceMask_GetStateBits(atmosphere, "Hydro_Atmosphere", "in_atmosphere")
- type2_bits = -1
-
nx = cctk_lsh(1)
ny = cctk_lsh(2)
nz = cctk_lsh(3)
@@ -100,7 +93,7 @@ subroutine Conservative2PrimitiveM(CCTK_ARGUMENTS)
do i = 1, nx
!do not compute if in atmosphere or in excised region
- if (SpaceMask_CheckStateBitsF90(space_mask, i, j, k, type_bits, atmosphere) .or. &
+ if ((atmosphere_mask(i,j,k) .ne. 0) .or. &
(hydro_excision_mask(i,j,k) .ne. 0)) cycle
epsnegative = 0
@@ -297,9 +290,6 @@ subroutine Conservative2PrimitiveBoundsM(CCTK_ARGUMENTS)
CCTK_INT :: epsnegative
character(len=100) warnline
- CCTK_INT :: type_bits, atmosphere
- CCTK_INT :: type2_bits
-
CCTK_REAL :: local_min_tracer
! begin EOS Omni vars
@@ -320,10 +310,6 @@ subroutine Conservative2PrimitiveBoundsM(CCTK_ARGUMENTS)
1.d0,1.0d0,xtemp,xye,local_gam,keyerr,anyerr)
local_gam=local_gam+1.0
- call SpaceMask_GetTypeBits(type_bits, "Hydro_Atmosphere")
- call SpaceMask_GetStateBits(atmosphere, "Hydro_Atmosphere", "in_atmosphere")
- type2_bits = -1
-
nx = cctk_lsh(1)
ny = cctk_lsh(2)
nz = cctk_lsh(3)
@@ -339,7 +325,7 @@ subroutine Conservative2PrimitiveBoundsM(CCTK_ARGUMENTS)
do i = GRHydro_stencil, nx - GRHydro_stencil + 1
!do not compute if in atmosphere or in an excised region
- if (SpaceMask_CheckStateBitsF90(space_mask, i, j, k, type_bits, atmosphere) .or. &
+ if ((atmosphere_mask(i,j,k) .ne. 0) .or. &
GRHydro_enable_internal_excision /= 0 .and. (hydro_excision_mask(i,j,k) .ne. 0)) cycle
gxxl = 0.5d0 * (gxx(i,j,k) + gxx(i-xoffset,j-yoffset,k-zoffset))
@@ -531,9 +517,6 @@ subroutine Conservative2PrimitivePolytypeM(CCTK_ARGUMENTS)
integer :: i, j, k, itracer, nx, ny, nz
CCTK_REAL :: uxx, uxy, uxz, uyy, uyz, uzz, det,b2
- CCTK_INT :: type_bits, atmosphere
- CCTK_INT :: type2_bits
-
CCTK_INT :: epsnegative
CCTK_REAL :: local_min_tracer, local_gam, local_pgam,local_K, sc
@@ -546,10 +529,6 @@ subroutine Conservative2PrimitivePolytypeM(CCTK_ARGUMENTS)
xpress=0.0d0;xtemp=0.0d0;xye=0.0d0;xeps=0.0d0
! end EOS Omni vars
- call SpaceMask_GetTypeBits(type_bits, "Hydro_Atmosphere")
- call SpaceMask_GetStateBits(atmosphere, "Hydro_Atmosphere", "in_atmosphere")
- type2_bits = -1
-
nx = cctk_lsh(1)
ny = cctk_lsh(2)
nz = cctk_lsh(3)
@@ -572,7 +551,7 @@ subroutine Conservative2PrimitivePolytypeM(CCTK_ARGUMENTS)
do i = 1, nx
!do not compute if in atmosphere or in an excised region
- if (SpaceMask_CheckStateBitsF90(space_mask, i, j, k, type_bits, atmosphere) .or. &
+ if ((atmosphere_mask(i,j,k) .ne. 0) .or. &
GRHydro_enable_internal_excision /= 0 .and. (hydro_excision_mask(i,j,k) .ne. 0)) cycle
det = SPATIAL_DETERMINANT(gxx(i,j,k),gxy(i,j,k),gxz(i,j,k),gyy(i,j,k),gyz(i,j,k),gzz(i,j,k))
@@ -661,9 +640,7 @@ subroutine Con2PrimBoundsPolytypeM(CCTK_ARGUMENTS)
CCTK_REAL :: gxxl,gxyl,gxzl,gyyl,gyzl,gzzl,avg_detl,&
gxxr,gxyr,gxzr,gyyr,gyzr,gzzr,avg_detr
CCTK_REAL :: b2minus, b2plus
-
- CCTK_INT :: type_bits, atmosphere
- CCTK_INT :: type2_bits, epsnegative
+ CCTK_INT :: epsnegative
CCTK_REAL :: local_gam, local_pgam,local_K,scplus,scminus
@@ -674,10 +651,6 @@ subroutine Con2PrimBoundsPolytypeM(CCTK_ARGUMENTS)
xpress=0.0d0;xtemp=0.0d0;xye=0.0d0;xeps=0.0d0
! end EOS Omni vars
- call SpaceMask_GetTypeBits(type_bits, "Hydro_Atmosphere")
- call SpaceMask_GetStateBits(atmosphere, "Hydro_Atmosphere", "in_atmosphere")
- type2_bits = -1
-
nx = cctk_lsh(1)
ny = cctk_lsh(2)
nz = cctk_lsh(3)
@@ -687,7 +660,7 @@ subroutine Con2PrimBoundsPolytypeM(CCTK_ARGUMENTS)
do i = GRHydro_stencil, nx - GRHydro_stencil + 1
!do not compute if in atmosphere or in an excised region
- if (SpaceMask_CheckStateBitsF90(space_mask, i, j, k, type_bits, atmosphere) .or. &
+ if ((atmosphere_mask(i,j,k) .ne. 0) .or. &
GRHydro_enable_internal_excision /= 0 .and. (hydro_excision_mask(i,j,k) .ne. 0)) cycle
gxxl = 0.5d0 * (gxx(i,j,k) + gxx(i-xoffset,j-yoffset,k-zoffset))
diff --git a/src/GRHydro_RegisterMask.c b/src/GRHydro_RegisterMask.c
index d440d4b..9609858 100644
--- a/src/GRHydro_RegisterMask.c
+++ b/src/GRHydro_RegisterMask.c
@@ -25,7 +25,6 @@
At the moment, the recognized states and values are
- Hydro_Atmosphere (in_atmosphere, not_in_atmosphere)
Hydro_RiemannProblem (trivial, not_trivial)
@enddesc
@@ -44,15 +43,8 @@ int GRHydro_RegisterMask(void)
int ierr;
- const char *atmosphere_list[2] = {"in_atmosphere","not_in_atmosphere"};
const char *rp_list[2] = {"trivial","not_trivial"};
- ierr = SpaceMask_RegisterType("Hydro_Atmosphere", 2, atmosphere_list);
- if (ierr)
- {
- CCTK_WARN(0, "Failed to register the atmosphere with the mask!");
- }
-
ierr = SpaceMask_RegisterType("Hydro_RiemannProblemX", 2, rp_list);
if (ierr)
{
@@ -74,16 +66,3 @@ int GRHydro_RegisterMask(void)
return 0;
}
-void GRHydro_SetupDescriptors(CCTK_ARGUMENTS)
-{
-
- DECLARE_CCTK_ARGUMENTS;
- DECLARE_CCTK_PARAMETERS;
-
- *atmosphere_field_descriptor=SpaceMask_GetTypeBits("Hydro_Atmosphere");
- *atmosphere_atmosp_descriptor=SpaceMask_GetStateBits("Hydro_Atmosphere",
- "in_atmosphere");
- *atmosphere_normal_descriptor = SpaceMask_GetStateBits("Hydro_Atmosphere",
- "not_in_atmosphere");
-}
-
diff --git a/src/GRHydro_UpdateMask.F90 b/src/GRHydro_UpdateMask.F90
index 734d84c..fbb4cda 100644
--- a/src/GRHydro_UpdateMask.F90
+++ b/src/GRHydro_UpdateMask.F90
@@ -34,11 +34,6 @@ subroutine GRHydroUpdateAtmosphereMask(CCTK_ARGUMENTS)
CCTK_INT :: i,j,k
CCTK_REAL :: frac
- CCTK_INT :: type_bits, atmosphere
-
- call SpaceMask_GetTypeBits(type_bits, "Hydro_Atmosphere")
- call SpaceMask_GetStateBits(atmosphere, "Hydro_Atmosphere", "in_atmosphere")
-
frac = CCTK_DELTA_TIME
if(evolve_temper.ne.1.and.evolve_Y_e.ne.1) then
@@ -47,16 +42,13 @@ subroutine GRHydroUpdateAtmosphereMask(CCTK_ARGUMENTS)
do j = 1, cctk_lsh(2)
do i = 1, cctk_lsh(1)
if ( GRHydro_enable_internal_excision /= 0 .and. (hydro_excision_mask(i,j,k) .ne. 0) .or. &
- (SpaceMask_CheckStateBitsF90(space_mask, i, j, k, \
- type_bits, atmosphere)) .or. &
+ (atmosphere_mask(i,j,k) .ne. 0) .or. &
(tau(i,j,k) + frac * taurhs(i,j,k) .le. 0.d0) .or. &
(dens(i,j,k) + frac * densrhs(i,j,k) .le. 0.d0) ) then
densrhs(i,j,k) = 0.0d0
srhs(i,j,k,:) = 0.0d0
taurhs(i,j,k) = 0.0d0
atmosphere_mask(i,j,k) = 1
-
- SpaceMask_SetStateBitsF90(space_mask, i, j, k, type_bits, atmosphere)
end if
end do
end do
@@ -69,16 +61,13 @@ subroutine GRHydroUpdateAtmosphereMask(CCTK_ARGUMENTS)
do j = 1, cctk_lsh(2)
do i = 1, cctk_lsh(1)
if ( GRHydro_enable_internal_excision /= 0 .and. (hydro_excision_mask(i,j,k) .ne. 0) .or. &
- (SpaceMask_CheckStateBitsF90(space_mask, i, j, k, \
- type_bits, atmosphere)) .or. &
+ (atmosphere_mask(i,j,k) .ne. 0) .or. &
(dens(i,j,k) + frac * densrhs(i,j,k) .le. 0.d0) ) then
y_e_con_rhs(i,j,k) = 0.0d0
densrhs(i,j,k) = 0.0d0
srhs(i,j,k,:) = 0.0d0
taurhs(i,j,k) = 0.0d0
atmosphere_mask(i,j,k) = 1
-
- SpaceMask_SetStateBitsF90(space_mask, i, j, k, type_bits, atmosphere)
end if
end do
end do
@@ -110,8 +99,6 @@ subroutine GRHydro_SetupMask(CCTK_ARGUMENTS)
DECLARE_CCTK_ARGUMENTS
DECLARE_CCTK_PARAMETERS
- CCTK_INT :: type_bits, not_atmosphere, i, j, k
-
! Initialize all rhs variables and the mask.
! The former vars need to be initialized since there is
! no rhs computation in CCTK_INITIAL or POSTINITIAL.
@@ -130,20 +117,6 @@ subroutine GRHydro_SetupMask(CCTK_ARGUMENTS)
atmosphere_mask = 0
- call SpaceMask_GetTypeBits(type_bits, "Hydro_Atmosphere")
- call SpaceMask_GetStateBits(not_atmosphere, &
- &"Hydro_Atmosphere", "not_in_atmosphere")
-
- do k = 1, cctk_lsh(3)
- do j = 1, cctk_lsh(2)
- do i = 1, cctk_lsh(1)
-
- SpaceMask_SetStateBitsF90(space_mask, i, j, k, type_bits, not_atmosphere)
-
- end do
- end do
- end do
-
call CCTK_INFO("Setting up the atmosphere mask: all points are not_atmosphere")
end subroutine GRHydro_SetupMask
@@ -169,23 +142,14 @@ subroutine GRHydro_InitAtmosMask(CCTK_ARGUMENTS)
DECLARE_CCTK_ARGUMENTS
- CCTK_INT :: type_bits, atmosphere, i, j, k
-
- call SpaceMask_GetTypeBits(type_bits, "Hydro_Atmosphere")
- call SpaceMask_GetStateBits(atmosphere, &
- &"Hydro_Atmosphere", "in_atmosphere")
+ CCTK_INT :: i,j,k
do k = 1, cctk_lsh(3)
do j = 1, cctk_lsh(2)
do i = 1, cctk_lsh(1)
-
if (rho(i,j,k) .le. GRHydro_rho_min) then
-
- SpaceMask_SetStateBitsF90(space_mask, i, j, k, type_bits, atmosphere)
atmosphere_mask(i,j,k) = 1
-
end if
-
end do
end do
end do
@@ -225,7 +189,6 @@ subroutine GRHydro_AtmosphereReset(CCTK_ARGUMENTS)
CCTK_INT :: i, j, k
CCTK_REAL :: det, psi4pt
- CCTK_INT :: type_bits, atmosphere, not_atmosphere
! save memory when MP is not used
CCTK_INT :: GRHydro_UseGeneralCoordinates
@@ -258,20 +221,12 @@ subroutine GRHydro_AtmosphereReset(CCTK_ARGUMENTS)
vup => vel
end if
- call SpaceMask_GetTypeBits(type_bits, "Hydro_Atmosphere")
- call SpaceMask_GetStateBits(atmosphere, "Hydro_Atmosphere",&
- "in_atmosphere")
- call SpaceMask_GetStateBits(not_atmosphere, "Hydro_Atmosphere",&
- "not_in_atmosphere")
!$OMP PARALLEL DO PRIVATE(det,keytemp,i,j,k,anyerr,keyerr)
do k = 1, cctk_lsh(3)
do j = 1, cctk_lsh(2)
do i = 1, cctk_lsh(1)
- if ( (atmosphere_mask(i, j, k) .eq. 1) &
- &.or. (SpaceMask_CheckStateBitsF90(space_mask,i, j, k, type_bits,\
- atmosphere)) &
- &) then
+ if (atmosphere_mask(i, j, k) .ne. 0) then
rho(i,j,k) = GRHydro_rho_min
velx(i,j,k) = 0.0d0
@@ -305,9 +260,7 @@ subroutine GRHydro_AtmosphereReset(CCTK_ARGUMENTS)
tau(i,j,k), rho(i,j,k), velx(i,j,k), vely(i,j,k), &
velz(i,j,k), eps(i,j,k), press(i,j,k), w_lorentz(i,j,k))
if (wk_atmosphere .eq. 0) then
- atmosphere_mask(i, j, k) = 0
- SpaceMask_SetStateBitsF90(space_mask, i, j, k, type_bits,\
- not_atmosphere)
+ atmosphere_mask(i, j, k) = 0
end if
endif
@@ -344,7 +297,6 @@ subroutine GRHydro_InitialAtmosphereReset(CCTK_ARGUMENTS)
CCTK_REAL :: det, psi4pt
CCTK_REAL :: rho_min
- CCTK_INT :: type_bits, atmosphere, not_atmosphere
CCTK_INT :: eos_handle
@@ -428,12 +380,6 @@ subroutine GRHydro_InitialAtmosphereReset(CCTK_ARGUMENTS)
eos_handle = GRHydro_polytrope_handle
- call SpaceMask_GetTypeBits(type_bits, "Hydro_Atmosphere")
- call SpaceMask_GetStateBits(atmosphere, "Hydro_Atmosphere",&
- "in_atmosphere")
- call SpaceMask_GetStateBits(not_atmosphere, "Hydro_Atmosphere",&
- "not_in_atmosphere")
-
rho_min = GRHydro_rho_min
if (initial_atmosphere_factor .gt. 0) then
rho_min = rho_min * initial_atmosphere_factor
diff --git a/src/GRHydro_UpdateMaskM.F90 b/src/GRHydro_UpdateMaskM.F90
index 9b6f65a..a9b2673 100644
--- a/src/GRHydro_UpdateMaskM.F90
+++ b/src/GRHydro_UpdateMaskM.F90
@@ -44,26 +44,11 @@ subroutine GRHydro_AtmosphereResetM(CCTK_ARGUMENTS)
CCTK_INT :: i, j, k
CCTK_REAL :: det, psi4pt
- CCTK_INT :: type_bits, atmosphere, not_atmosphere
-
- call SpaceMask_GetTypeBits(type_bits, "Hydro_Atmosphere")
- call SpaceMask_GetStateBits(atmosphere, "Hydro_Atmosphere",&
- "in_atmosphere")
- call SpaceMask_GetStateBits(not_atmosphere, "Hydro_Atmosphere",&
- "not_in_atmosphere")
-
do k = 1, cctk_lsh(3)
do j = 1, cctk_lsh(2)
do i = 1, cctk_lsh(1)
- if ( (atmosphere_mask(i, j, k) .eq. 1) &
- &.or. (SpaceMask_CheckStateBitsF90(space_mask,i, j, k, type_bits,\
- atmosphere)) &
- &) then
-
-!!$ write(*,*) 'Resetting at ',i,j,k, atmosphere_mask(i, j, k), &
-!!$ & (SpaceMask_CheckStateBitsF90(space_mask,i, j, k, type_bits,\
-!!$ atmosphere))
+ if ( atmosphere_mask(i, j, k) .eq. 1) then
rho(i,j,k) = GRHydro_rho_min
vel(i,j,k,1) = 0.0d0
@@ -81,8 +66,6 @@ subroutine GRHydro_AtmosphereResetM(CCTK_ARGUMENTS)
Bvec(i,j,k,1),Bvec(i,j,k,2),Bvec(i,j,k,3),w_lorentz(i,j,k))
if (wk_atmosphere .eq. 0) then
atmosphere_mask(i, j, k) = 0
- SpaceMask_SetStateBitsF90(space_mask, i, j, k, type_bits,\
- not_atmosphere)
end if
end if
@@ -105,7 +88,6 @@ subroutine GRHydro_InitialAtmosphereResetM(CCTK_ARGUMENTS)
CCTK_INT :: i, j, k
CCTK_REAL :: det, psi4pt
- CCTK_INT :: type_bits, atmosphere, not_atmosphere
CCTK_INT :: eos_handle
! begin EOS Omni vars
@@ -117,12 +99,6 @@ subroutine GRHydro_InitialAtmosphereResetM(CCTK_ARGUMENTS)
eos_handle = GRHydro_polytrope_handle
- call SpaceMask_GetTypeBits(type_bits, "Hydro_Atmosphere")
- call SpaceMask_GetStateBits(atmosphere, "Hydro_Atmosphere",&
- "in_atmosphere")
- call SpaceMask_GetStateBits(not_atmosphere, "Hydro_Atmosphere",&
- "not_in_atmosphere")
-
do k = 1, cctk_lsh(3)
do j = 1, cctk_lsh(2)
do i = 1, cctk_lsh(1)