[Commits] [svn:einsteintoolkit] GRHydro/trunk/src/ (Rev. 192)
cott at tapir.caltech.edu
cott at tapir.caltech.edu
Tue Dec 21 00:52:27 CST 2010
User: cott
Date: 2010/12/21 12:52 AM
Modified:
/trunk/src/
GRHydro_Con2Prim.F90
Log:
* improve thread safety of hot c2p routine
File Changes:
Directory: /trunk/src/
======================
File [modified]: GRHydro_Con2Prim.F90
Delta lines: +10 -8
===================================================================
--- trunk/src/GRHydro_Con2Prim.F90 2010-12-18 12:00:43 UTC (rev 191)
+++ trunk/src/GRHydro_Con2Prim.F90 2010-12-21 06:52:27 UTC (rev 192)
@@ -490,6 +490,8 @@
CCTK_REAL GRHydro_C2P_failed
CCTK_REAL udens, usx, usy, usz, utau, pold, pnew, epsold, epsnew, w2, &
w2mhalf, temp1, drhobydpress, depsbydpress, dpressbydeps, dpressbydrho, pmin, epsmin
+ CCTK_REAL epsminl,pminl
+
character(len=200) warnline
logical epsnegative
@@ -506,8 +508,8 @@
! end EOS Omni vars
! set pmin and epsmin to something sensible:
- pmin = 1.0d-28
- epsmin = 1.0e-5
+ pminl = 1.0d-28
+ epsminl = 1.0e-5
if(con2prim_oct_hack.ne.0.and.&
@@ -622,10 +624,10 @@
rho = GRHydro_rho_min
udens = rho
dens = sqrt(det) * rho
- pnew = pmin
- epsilon = epsmin
+ pnew = pminl
+ epsilon = epsminl
! w_lorentz=1, so the expression for utau reduces to:
- utau = rho + rho*epsmin - udens
+ utau = rho + rho*epsminl - udens
sx = 0.d0
sy = 0.d0
sz = 0.d0
@@ -650,7 +652,7 @@
dpressbydeps*depsbydpress
pold = pnew
- pnew = max(pold - f/df, pmin)
+ pnew = max(pold - f/df, pminl)
!!$ Recalculate primitive variables and function
@@ -740,9 +742,9 @@
udens = rho
dens = sqrt(det) * rho
! epsilon = (sqrt( (utau + pnew + udens)**2) - pnew - udens)/udens
- epsilon = epsmin
+ epsilon = epsminl
! w_lorentz=1, so the expression for utau reduces to:
- utau = rho + rho*epsmin - udens
+ utau = rho + rho*epsminl - udens
sx = 0.d0
sy = 0.d0
sz = 0.d0
More information about the Commits
mailing list