[Commits] [svn:einsteintoolkit] GRHydro/trunk/src/ (Rev. 157)
knarf at cct.lsu.edu
knarf at cct.lsu.edu
Wed Sep 22 08:49:10 CDT 2010
User: knarf
Date: 2010/09/22 08:49 AM
Modified:
/trunk/src/
GRHydro_UpdateMask.F90
Log:
add EOS Omni support
File Changes:
Directory: /trunk/src/
======================
File [modified]: GRHydro_UpdateMask.F90
Delta lines: +47 -3
===================================================================
--- trunk/src/GRHydro_UpdateMask.F90 2010-09-15 18:50:13 UTC (rev 156)
+++ trunk/src/GRHydro_UpdateMask.F90 2010-09-22 13:49:10 UTC (rev 157)
@@ -253,10 +253,27 @@
CCTK_INT :: type_bits, atmosphere, not_atmosphere
CCTK_INT :: eos_handle
+#if !USE_EOS_OMNI
+#ifdef _EOS_BASE_INC_
+#undef _EOS_BASE_INC_
+#endif
+#include "EOS_Base.inc"
+#endif
+
+#if USE_EOS_OMNI
+! begin EOS Omni vars
+ integer :: n = 1
+ integer :: keytemp = 0
+ integer :: anyerr = 0
+ integer :: keyerr(1) = 0
+ real*8 :: xpress = 0.0d0
+ real*8 :: xeps = 0.0d0
+ real*8 :: xtemp = 0.0d0
+ real*8 :: xye = 0.0d0
+! end EOS Omni vars
+#endif
+
eos_handle = GRHydro_polytrope_handle
- if (use_eosgeneral == 0) then
- eos_handle = -1
- endif
call SpaceMask_GetTypeBits(type_bits, "Hydro_Atmosphere")
call SpaceMask_GetStateBits(atmosphere, "Hydro_Atmosphere",&
@@ -273,6 +290,15 @@
velx(i,j,k) = 0.0d0
vely(i,j,k) = 0.0d0
velz(i,j,k) = 0.0d0
+#if USE_EOS_OMNI
+ call EOS_Omni_press(eos_handle,keytemp,GRHydro_eos_rf_prec,n,&
+ rho(i,j,k),eps(i,j,k),xtemp,xye,press(i,j,k),keyerr,anyerr)
+ call EOS_Omni_EpsFromPress(eos_handle,keytemp,GRHydro_eos_rf_prec,n,&
+ rho(i,j,k),xeps,xtemp,xye,press(i,j,k),eps(i,j,k),keyerr,anyerr)
+#else
+ press(i,j,k) = EOS_Pressure(eos_handle, GRHydro_rho_min, eps(i,j,k))
+ eps(i,j,k) = EOS_SpecificIntEnergy(eos_handle, GRHydro_rho_min, press(i,j,k))
+#endif
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))
call prim2conpolytype(eos_handle, &
@@ -288,6 +314,15 @@
velx_p(i,j,k) = 0.0d0
vely_p(i,j,k) = 0.0d0
velz_p(i,j,k) = 0.0d0
+#if USE_EOS_OMNI
+ call EOS_Omni_press(eos_handle,keytemp,GRHydro_eos_rf_prec,n,&
+ rho_p(i,j,k),eps_p(i,j,k),xtemp,xye,press_p(i,j,k),keyerr,anyerr)
+ call EOS_Omni_EpsFromPress(eos_handle,keytemp,GRHydro_eos_rf_prec,n,&
+ rho_p(i,j,k),xeps,xtemp,xye,press_p(i,j,k),eps_p(i,j,k),keyerr,anyerr)
+#else
+ press_p(i,j,k) = EOS_Pressure(eos_handle, GRHydro_rho_min, eps_p(i,j,k))
+ eps_p(i,j,k) = EOS_SpecificIntEnergy(eos_handle, GRHydro_rho_min, press_p(i,j,k))
+#endif
det = SPATIAL_DETERMINANT(gxx_p(i,j,k), gxy_p(i,j,k), gxz_p(i,j,k), \
gyy_p(i,j,k), gyz_p(i,j,k), gzz_p(i,j,k))
call prim2conpolytype(eos_handle, &
@@ -304,6 +339,15 @@
velx_p_p(i,j,k) = 0.0d0
vely_p_p(i,j,k) = 0.0d0
velz_p_p(i,j,k) = 0.0d0
+#if USE_EOS_OMNI
+ call EOS_Omni_press(eos_handle,keytemp,GRHydro_eos_rf_prec,n,&
+ rho_p_p(i,j,k),eps_p_p(i,j,k),xtemp,xye,press_p_p(i,j,k),keyerr,anyerr)
+ call EOS_Omni_EpsFromPress(eos_handle,keytemp,GRHydro_eos_rf_prec,n,&
+ rho_p_p(i,j,k),xeps,xtemp,xye,press_p_p(i,j,k),eps_p_p(i,j,k),keyerr,anyerr)
+#else
+ press_p_p(i,j,k) = EOS_Pressure(eos_handle, GRHydro_rho_min, eps_p_p(i,j,k))
+ eps_p_p(i,j,k) = EOS_SpecificIntEnergy(eos_handle, GRHydro_rho_min, press_p_p(i,j,k))
+#endif
det = SPATIAL_DETERMINANT(gxx_p_p(i,j,k), gxy_p_p(i,j,k), gxz_p_p(i,j,k), \
gyy_p_p(i,j,k), gyz_p_p(i,j,k), gzz_p_p(i,j,k))
call prim2conpolytype(eos_handle, &
More information about the Commits
mailing list