aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorcott <cott@c83d129a-5a75-4d5a-9c4d-ed3a5855bf45>2010-03-31 01:12:52 +0000
committercott <cott@c83d129a-5a75-4d5a-9c4d-ed3a5855bf45>2010-03-31 01:12:52 +0000
commitfda4ba17d2e54a4b4fdcdd27d025c9980c04a610 (patch)
tree7f191304e220b63293a5252b1eb28040b4d1b6a7 /src
parent588d52fae82fd4c7388c56b171e930361e68598b (diff)
* update handling of C2P failures in old EOS interface (again) --
now we set failed points to atmosphere. This will screw the evolution at any evolution-relevant point, but will allow the job to continue in normal fashion if the C2P failure is in boundary or buffer zones. A new carpet-based mask to handle this more cleanly is under development by E. Schnetter git-svn-id: http://svn.einsteintoolkit.org/cactus/EinsteinEvolve/GRHydro/trunk@92 c83d129a-5a75-4d5a-9c4d-ed3a5855bf45
Diffstat (limited to 'src')
-rw-r--r--src/Whisky_Con2Prim.F9033
1 files changed, 32 insertions, 1 deletions
diff --git a/src/Whisky_Con2Prim.F90 b/src/Whisky_Con2Prim.F90
index e7f2383..5902c77 100644
--- a/src/Whisky_Con2Prim.F90
+++ b/src/Whisky_Con2Prim.F90
@@ -241,7 +241,38 @@ subroutine Conservative2Primitive(CCTK_ARGUMENTS)
if (epsnegative) then
- whisky_C2P_failed(i,j,k) = 1
+ ! cott 2010/03/30:
+ ! Set point to atmosphere, but continue evolution -- this is better than using
+ ! the poly EOS -- it will lead the code to crash if this happens inside a (neutron) star,
+ ! but will allow the job to continue if it happens in the atmosphere or in a
+ ! zone that contains garbage (i.e. boundary, buffer zones)
+ ! Ultimately, we want this fixed via a new carpet mask presently under development
+! whisky_C2P_failed(i,j,k) = 1
+
+ !$OMP CRITICAL
+ call CCTK_WARN(1, 'Specific internal energy just went below 0! ')
+ write(warnline,'(a28,i2)') 'on carpet reflevel: ',whisky_reflevel
+ call CCTK_WARN(1,warnline)
+ write(warnline,'(a20,3g16.7)') 'xyz location: ',&
+ x(i,j,k),y(i,j,k),z(i,j,k)
+ call CCTK_WARN(1,warnline)
+ write(warnline,'(a20,g16.7)') 'radius: ',r(i,j,k)
+ call CCTK_WARN(1,warnline)
+ call CCTK_WARN(1,"Setting the point to atmosphere")
+ !$OMP END CRITICAL
+
+ ! for safety, let's set the point to atmosphere
+ dens(i,j,k) = sqrt(det)*whisky_rho_min !/(1.d0+whisky_atmo_tolerance)
+ rho(i,j,k) = whisky_rho_min
+ scon(i,j,k,:) = 0.d0
+ vel(i,j,k,:) = 0.d0
+ w_lorentz(i,j,k) = 1.d0
+ press(i,j,k) = EOS_Pressure(whisky_polytrope_handle, rho(i,j,k), eps(i,j,k))
+ eps(i,j,k) = EOS_SpecificIntEnergy(whisky_polytrope_handle, rho(i,j,k), press(i,j,k))
+ ! w_lorentz=1, so the expression for tau reduces to:
+ tau(i,j,k) = sqrt(det) * (rho(i,j,k)+rho(i,j,k)*eps(i,j,k)) - dens(i,j,k)
+
+
#if 0
! cott 2010/03/27: