diff options
author | rhaas <rhaas@c83d129a-5a75-4d5a-9c4d-ed3a5855bf45> | 2013-07-06 18:10:16 +0000 |
---|---|---|
committer | rhaas <rhaas@c83d129a-5a75-4d5a-9c4d-ed3a5855bf45> | 2013-07-06 18:10:16 +0000 |
commit | a25126b7eea2576c4cae5075befae6d67e09b7c6 (patch) | |
tree | 082dc475376780adcabf83d5e5f8de6842ac1908 | |
parent | 5ae2b6c2c60e1f3533020b744a7046b0e7cfef82 (diff) |
GRHydro: Critical bugfix: Con2Prim was probably never executed in post_recover_variables or for new points in post_regrid since
excision mask does typically not get initialized before MoL_PostStep!
Also: Instead of aborting Con2Prim, set points to atmopshere for a point where hydro_excision_mask > 0.
From: Christian Reisswig <reisswig@scriwalker.(none)>
git-svn-id: http://svn.einsteintoolkit.org/cactus/EinsteinEvolve/GRHydro/trunk@542 c83d129a-5a75-4d5a-9c4d-ed3a5855bf45
-rw-r--r-- | src/GRHydro_Con2PrimHot.F90 | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/GRHydro_Con2PrimHot.F90 b/src/GRHydro_Con2PrimHot.F90 index 58cfa29..a9e37f4 100644 --- a/src/GRHydro_Con2PrimHot.F90 +++ b/src/GRHydro_Con2PrimHot.F90 @@ -35,7 +35,7 @@ subroutine Conservative2PrimitiveHot(CCTK_ARGUMENTS) CCTK_REAL, DIMENSION(:,:,:,:), POINTER :: vup ! begin EOS Omni vars - integer :: n,keytemp,anyerr,keyerr(1) + integer :: n,keytemp,anyerr,keyerr(1), reset_to_atmo real*8 :: xpress(1),xeps(1),xtemp(1),xye(1),xrho(1) n = 1;keytemp = 0;anyerr = 0;keyerr(1) = 0 xpress = 0.0d0;xeps = 0.0d0;xtemp = 0.0d0;xye = 0.0d0 @@ -89,9 +89,8 @@ subroutine Conservative2PrimitiveHot(CCTK_ARGUMENTS) do i = 1, nx - !do not compute if in atmosphere or in excised region - if ((atmosphere_mask(i,j,k) .ne. 0) .or. & - (hydro_excision_mask(i,j,k) .ne. 0)) cycle + !do not compute if in atmosphere + if (atmosphere_mask(i,j,k) .gt. 0) cycle epsnegative = .false. @@ -121,8 +120,12 @@ subroutine Conservative2PrimitiveHot(CCTK_ARGUMENTS) GRHydro_Y_e_min) endif + reset_to_atmo = 0 IF_BELOW_ATMO(dens(i,j,k), sqrt(det)*GRHydro_rho_min, GRHydro_atmo_tolerance, r(i,j,k)) then + reset_to_atmo = 1 + endif + if (reset_to_atmo .gt. 0 .or. hydro_excision_mask(i,j,k) .gt. 0) then SET_ATMO_MIN(dens(i,j,k), sqrt(det)*GRHydro_rho_min, r(i,j,k)) SET_ATMO_MIN(rho(i,j,k), GRHydro_rho_min, r(i,j,k)) scon(i,j,k,:) = 0.d0 |