[Commits] [svn:einsteintoolkit] GRHydro/trunk/src/ (Rev. 201)
cott at tapir.caltech.edu
cott at tapir.caltech.edu
Thu Dec 30 02:49:37 CST 2010
User: cott
Date: 2010/12/30 02:49 AM
Modified:
/trunk/src/
GRHydro_Con2Prim.F90
Log:
* update error handling in _hot routine: warn only starting
from a given reflevel
File Changes:
Directory: /trunk/src/
======================
File [modified]: GRHydro_Con2Prim.F90
Delta lines: +60 -53
===================================================================
--- trunk/src/GRHydro_Con2Prim.F90 2010-12-25 06:53:39 UTC (rev 200)
+++ trunk/src/GRHydro_Con2Prim.F90 2010-12-30 08:49:37 UTC (rev 201)
@@ -529,16 +529,18 @@
pold = max(1.d-15,xpress)
! error handling
if(anyerr.ne.0) then
- call CCTK_WARN(failinfomode,"EOS error in c2p 0")
- write(warnline,"(3i5,1P10E15.6)") ii,jj,kk,x,y,z
- call CCTK_WARN(failinfomode,warnline)
- write(warnline,"(1P10E15.6)") rho,dens,epsilon,temp,temp0,ye
- call CCTK_WARN(failinfomode,warnline)
- write(warnline,"(A7,i8)") "code: ",keyerr(1)
- call CCTK_WARN(failinfomode,warnline)
- write(warnline,"(A10,i5)") "reflevel: ", GRHydro_reflevel
- call CCTK_WARN(failinfomode,warnline)
- call CCTK_WARN(failwarnmode,"Aborting!!!")
+ if (GRHydro_reflevel.ge.GRHydro_c2p_warn_from_reflevel) then
+ call CCTK_WARN(failinfomode,"EOS error in c2p 0")
+ write(warnline,"(3i5,1P10E15.6)") ii,jj,kk,x,y,z
+ call CCTK_WARN(failinfomode,warnline)
+ write(warnline,"(1P10E15.6)") rho,dens,epsilon,temp,temp0,ye
+ call CCTK_WARN(failinfomode,warnline)
+ write(warnline,"(A7,i8)") "code: ",keyerr(1)
+ call CCTK_WARN(failinfomode,warnline)
+ write(warnline,"(A10,i5)") "reflevel: ", GRHydro_reflevel
+ call CCTK_WARN(failinfomode,warnline)
+ call CCTK_WARN(failwarnmode,"Aborting!!!")
+ endif
endif
@@ -572,18 +574,19 @@
rho,epsilon,temp,ye,xpress,keyerr,anyerr)
! error handling
if(anyerr.ne.0) then
- call CCTK_WARN(failinfomode,"EOS error in c2p 1")
- write(warnline,"(3i5,1P10E15.6)") ii,jj,kk,x,y,z
- call CCTK_WARN(failinfomode,warnline)
- write(warnline,"(1P10E15.6)") rho,epsilon,temp,ye
- call CCTK_WARN(failinfomode,warnline)
- write(warnline,"(A7,i8)") "code: ",keyerr(1)
- call CCTK_WARN(failinfomode,warnline)
- write(warnline,"(A10,i5)") "reflevel: ", GRHydro_reflevel
- call CCTK_WARN(failinfomode,warnline)
- call CCTK_WARN(failwarnmode,"Aborting!!!")
+ if (GRHydro_reflevel.ge.GRHydro_c2p_warn_from_reflevel) then
+ call CCTK_WARN(failinfomode,"EOS error in c2p 1")
+ write(warnline,"(3i5,1P10E15.6)") ii,jj,kk,x,y,z
+ call CCTK_WARN(failinfomode,warnline)
+ write(warnline,"(1P10E15.6)") rho,epsilon,temp,ye
+ call CCTK_WARN(failinfomode,warnline)
+ write(warnline,"(A7,i8)") "code: ",keyerr(1)
+ call CCTK_WARN(failinfomode,warnline)
+ write(warnline,"(A10,i5)") "reflevel: ", GRHydro_reflevel
+ call CCTK_WARN(failinfomode,warnline)
+ call CCTK_WARN(failwarnmode,"Aborting!!!")
+ endif
endif
-
f = pold - xpress
@@ -600,16 +603,18 @@
GRHydro_C2P_failed = 1
!$OMP CRITICAL
- call CCTK_WARN(failinfomode, 'count > GRHydro_countmax! ')
- write(warnline,'(a28,i2)') 'on carpet reflevel: ',GRHydro_reflevel
- call CCTK_WARN(failinfomode,warnline)
- write(warnline,'(a20,3g16.7)') 'xyz location: ',x,y,z
- call CCTK_WARN(failinfomode,warnline)
- write(warnline,'(a20,3i5)') 'ijk location: ',ii,jj,kk
- call CCTK_WARN(failinfomode,warnline)
- write(warnline,'(a20,g16.7)') 'radius: ',r
- call CCTK_WARN(failinfomode,warnline)
- call CCTK_WARN(failinfomode,"Setting the point to atmosphere")
+ if (GRHydro_reflevel.ge.GRHydro_c2p_warn_from_reflevel) then
+ call CCTK_WARN(failinfomode, 'count > GRHydro_countmax! ')
+ write(warnline,'(a28,i2)') 'on carpet reflevel: ',GRHydro_reflevel
+ call CCTK_WARN(failinfomode,warnline)
+ write(warnline,'(a20,3g16.7)') 'xyz location: ',x,y,z
+ call CCTK_WARN(failinfomode,warnline)
+ write(warnline,'(a20,3i5)') 'ijk location: ',ii,jj,kk
+ call CCTK_WARN(failinfomode,warnline)
+ write(warnline,'(a20,g16.7)') 'radius: ',r
+ call CCTK_WARN(failinfomode,warnline)
+ call CCTK_WARN(failinfomode,"Setting the point to atmosphere")
+ endif
!$OMP END CRITICAL
! for safety, let's set the point to atmosphere
@@ -661,18 +666,19 @@
rho,epsilon,temp,ye,xpress,keyerr,anyerr)
! error handling
if(anyerr.ne.0) then
- call CCTK_WARN(failinfomode,"EOS error in c2p 2")
- write(warnline,"(3i5,1P10E15.6)") ii,jj,kk,x,y,z
- call CCTK_WARN(failinfomode,warnline)
- write(warnline,"(1P10E15.6)") rho,epsilon,temp,ye
- call CCTK_WARN(failinfomode,warnline)
- write(warnline,"(A7,i8)") "code: ",keyerr(1)
- call CCTK_WARN(failinfomode,warnline)
- write(warnline,"(A10,i5)") "reflevel: ", GRHydro_reflevel
- call CCTK_WARN(failinfomode,warnline)
- call CCTK_WARN(failwarnmode,"Aborting!!!")
+ if (GRHydro_reflevel.ge.GRHydro_c2p_warn_from_reflevel) then
+ call CCTK_WARN(failinfomode,"EOS error in c2p 2")
+ write(warnline,"(3i5,1P10E15.6)") ii,jj,kk,x,y,z
+ call CCTK_WARN(failinfomode,warnline)
+ write(warnline,"(1P10E15.6)") rho,epsilon,temp,ye
+ call CCTK_WARN(failinfomode,warnline)
+ write(warnline,"(A7,i8)") "code: ",keyerr(1)
+ call CCTK_WARN(failinfomode,warnline)
+ write(warnline,"(A10,i5)") "reflevel: ", GRHydro_reflevel
+ call CCTK_WARN(failinfomode,warnline)
+ call CCTK_WARN(failwarnmode,"Aborting!!!")
+ endif
endif
-
f = pnew - xpress
enddo
@@ -710,18 +716,19 @@
! error handling
if(anyerr.ne.0) then
- call CCTK_WARN(failinfomode,"EOS error in c2p 3")
- write(warnline,"(3i5,1P10E15.6)") ii,jj,kk,x,y,z
- call CCTK_WARN(failinfomode,warnline)
- write(warnline,"(1P10E15.6)") rho,epsilon,temp,ye
- call CCTK_WARN(failinfomode,warnline)
- write(warnline,"(A7,i8)") "code: ",keyerr(1)
- call CCTK_WARN(failinfomode,warnline)
- write(warnline,"(A10,i5)") "reflevel: ", GRHydro_reflevel
- call CCTK_WARN(failinfomode,warnline)
- call CCTK_WARN(failwarnmode,"Aborting!!!")
+ if (GRHydro_reflevel.ge.GRHydro_c2p_warn_from_reflevel) then
+ call CCTK_WARN(failinfomode,"EOS error in c2p 3")
+ write(warnline,"(3i5,1P10E15.6)") ii,jj,kk,x,y,z
+ call CCTK_WARN(failinfomode,warnline)
+ write(warnline,"(1P10E15.6)") rho,epsilon,temp,ye
+ call CCTK_WARN(failinfomode,warnline)
+ write(warnline,"(A7,i8)") "code: ",keyerr(1)
+ call CCTK_WARN(failinfomode,warnline)
+ write(warnline,"(A10,i5)") "reflevel: ", GRHydro_reflevel
+ call CCTK_WARN(failinfomode,warnline)
+ call CCTK_WARN(failwarnmode,"Aborting!!!")
+ endif
endif
-
f = pold - xpress
More information about the Commits
mailing list