From d3ae4d3ca10b01fb3ac5a53476b17429a9d5ead2 Mon Sep 17 00:00:00 2001 From: cott Date: Wed, 18 Aug 2010 18:41:07 +0000 Subject: * change interface, add scalar double precision variable rf_precision that allows the application thorn to specify the relative precision between iterations at which EOS root finding should be stopped. git-svn-id: http://svn.einsteintoolkit.org/cactus/EinsteinEOS/EOS_Omni/EOS_Omni@7 8e189c6b-2ab8-4400-aa02-70a9cfce18b9 --- interface.ccl | 6 ++++++ src/EOS_Omni_SingleVarCalls.F90 | 20 +++++++++++++------- 2 files changed, 19 insertions(+), 7 deletions(-) diff --git a/interface.ccl b/interface.ccl index 971f439..2d7d08c 100644 --- a/interface.ccl +++ b/interface.ccl @@ -10,6 +10,7 @@ PROVIDES FUNCTION EOS_Omni_GetHandle with EOS_Omni_GetHandle_ LANGUAGE C void FUNCTION EOS_Omni_press(CCTK_INT IN eoskey, \ CCTK_INT IN havetemp, \ + CCTK_REAL IN rf_precision, \ CCTK_INT IN npoints, \ CCTK_REAL IN ARRAY rho, \ CCTK_REAL INOUT ARRAY eps, \ @@ -24,6 +25,7 @@ PROVIDES FUNCTION EOS_Omni_press WITH EOS_Omni_EOS_Press LANGUAGE Fortran void FUNCTION EOS_Omni_DPressByDEps(CCTK_INT IN eoskey, \ CCTK_INT IN havetemp, \ + CCTK_REAL IN rf_precision, \ CCTK_INT IN npoints, \ CCTK_REAL IN ARRAY rho, \ CCTK_REAL INOUT ARRAY eps, \ @@ -38,6 +40,7 @@ PROVIDES FUNCTION EOS_Omni_DPressByDEps WITH EOS_Omni_EOS_DPressByDEps LANGUAGE void FUNCTION EOS_Omni_DPressByDRho(CCTK_INT IN eoskey, \ CCTK_INT IN havetemp, \ + CCTK_REAL IN rf_precision, \ CCTK_INT IN npoints, \ CCTK_REAL IN ARRAY rho, \ CCTK_REAL INOUT ARRAY eps, \ @@ -52,6 +55,7 @@ PROVIDES FUNCTION EOS_Omni_DPressByDRho WITH EOS_Omni_EOS_DPressByDRho LANGUAGE void FUNCTION EOS_Omni_cs2(CCTK_INT IN eoskey, \ CCTK_INT IN havetemp, \ + CCTK_REAL IN rf_precision, \ CCTK_INT IN npoints, \ CCTK_REAL IN ARRAY rho, \ CCTK_REAL INOUT ARRAY eps, \ @@ -66,6 +70,7 @@ PROVIDES FUNCTION EOS_Omni_cs2 WITH EOS_Omni_EOS_cs2 LANGUAGE Fortran void FUNCTION EOS_Omni_EpsFromPress(CCTK_INT IN eoskey, \ CCTK_INT IN havetemp, \ + CCTK_REAL IN rf_precision, \ CCTK_INT IN npoints, \ CCTK_REAL IN ARRAY rho, \ CCTK_REAL INOUT ARRAY eps, \ @@ -81,6 +86,7 @@ PROVIDES FUNCTION EOS_Omni_EpsFromPress WITH EOS_Omni_EOS_eps_from_press LANGUAG void FUNCTION EOS_Omni_RestMassDensityFromEpsPress(CCTK_INT IN eoskey, \ CCTK_INT IN havetemp, \ + CCTK_REAL IN rf_precision, \ CCTK_INT IN npoints, \ CCTK_REAL OUT ARRAY rho, \ CCTK_REAL IN ARRAY eps, \ diff --git a/src/EOS_Omni_SingleVarCalls.F90 b/src/EOS_Omni_SingleVarCalls.F90 index 60c656d..73daa55 100644 --- a/src/EOS_Omni_SingleVarCalls.F90 +++ b/src/EOS_Omni_SingleVarCalls.F90 @@ -9,7 +9,7 @@ ! 3 --- hybrid EOS ! 4 --- finite-T microphysical NSE EOS -subroutine EOS_Omni_EOS_Press(eoskey,keytemp,npoints,& +subroutine EOS_Omni_EOS_Press(eoskey,keytemp,rf_precision,npoints,& rho,eps,temp,ye,press,keyerr,anyerr) use EOS_Omni_Module @@ -19,6 +19,7 @@ subroutine EOS_Omni_EOS_Press(eoskey,keytemp,npoints,& CCTK_INT, intent(in) :: eoskey,keytemp,npoints CCTK_INT, intent(out) :: keyerr(npoints) CCTK_INT, intent(out) :: anyerr + CCTK_REAL, intent(in) :: rf_precision CCTK_REAL, intent(in) :: rho(npoints),ye(npoints) CCTK_REAL, intent(inout) :: eps(npoints), temp(npoints) CCTK_REAL, intent(out) :: press(npoints) @@ -92,7 +93,7 @@ end subroutine EOS_Omni_EOS_Press -subroutine EOS_Omni_EOS_DPressByDRho(eoskey,keytemp,npoints,& +subroutine EOS_Omni_EOS_DPressByDRho(eoskey,keytemp,rf_precision,npoints,& rho,eps,temp,ye,dpdrhoe,keyerr,anyerr) use EOS_Omni_Module @@ -102,6 +103,7 @@ subroutine EOS_Omni_EOS_DPressByDRho(eoskey,keytemp,npoints,& CCTK_INT, intent(in) :: eoskey,keytemp,npoints CCTK_INT, intent(out) :: keyerr(npoints) CCTK_INT, intent(out) :: anyerr + CCTK_REAL, intent(in) :: rf_precision CCTK_REAL, intent(in) :: rho(npoints),ye(npoints) CCTK_REAL, intent(inout) :: eps(npoints), temp(npoints) CCTK_REAL, intent(out) :: dpdrhoe(npoints) @@ -179,7 +181,7 @@ subroutine EOS_Omni_EOS_DPressByDRho(eoskey,keytemp,npoints,& end subroutine EOS_Omni_EOS_DPressByDRho -subroutine EOS_Omni_EOS_DPressByDEps(eoskey,keytemp,npoints,& +subroutine EOS_Omni_EOS_DPressByDEps(eoskey,keytemp,rf_precision,npoints,& rho,eps,temp,ye,dpdepsrho,keyerr,anyerr) use EOS_Omni_Module @@ -189,6 +191,7 @@ subroutine EOS_Omni_EOS_DPressByDEps(eoskey,keytemp,npoints,& CCTK_INT, intent(in) :: eoskey,keytemp,npoints CCTK_INT, intent(out) :: keyerr(npoints) CCTK_INT, intent(out) :: anyerr + CCTK_REAL, intent(in) :: rf_precision CCTK_REAL, intent(in) :: rho(npoints),ye(npoints) CCTK_REAL, intent(inout) :: eps(npoints), temp(npoints) CCTK_REAL, intent(out) :: dpdepsrho(npoints) @@ -238,7 +241,7 @@ subroutine EOS_Omni_EOS_DPressByDEps(eoskey,keytemp,npoints,& end subroutine EOS_Omni_EOS_DPressByDEps -subroutine EOS_Omni_EOS_cs2(eoskey,keytemp,npoints,& +subroutine EOS_Omni_EOS_cs2(eoskey,keytemp,rf_precision,npoints,& rho,eps,temp,ye,cs2,keyerr,anyerr) use EOS_Omni_Module @@ -248,6 +251,7 @@ subroutine EOS_Omni_EOS_cs2(eoskey,keytemp,npoints,& CCTK_INT, intent(in) :: eoskey,keytemp,npoints CCTK_INT, intent(out) :: keyerr(npoints) CCTK_INT, intent(out) :: anyerr + CCTK_REAL, intent(in) :: rf_precision CCTK_REAL, intent(in) :: rho(npoints),ye(npoints) CCTK_REAL, intent(inout) :: eps(npoints), temp(npoints) CCTK_REAL, intent(out) :: cs2(npoints) @@ -328,7 +332,7 @@ subroutine EOS_Omni_EOS_cs2(eoskey,keytemp,npoints,& end subroutine EOS_Omni_EOS_cs2 -subroutine EOS_Omni_EOS_eps_from_press(eoskey,keytemp,npoints,& +subroutine EOS_Omni_EOS_eps_from_press(eoskey,keytemp,rf_precision,npoints,& rho,eps,temp,ye,press,xeps,keyerr,anyerr) use EOS_Omni_Module @@ -338,6 +342,7 @@ subroutine EOS_Omni_EOS_eps_from_press(eoskey,keytemp,npoints,& CCTK_INT, intent(in) :: eoskey,keytemp,npoints CCTK_INT, intent(out) :: keyerr(npoints) CCTK_INT, intent(out) :: anyerr + CCTK_REAL, intent(in) :: rf_precision CCTK_REAL, intent(in) :: rho(npoints),ye(npoints),press(npoints) CCTK_REAL, intent(inout) :: eps(npoints), temp(npoints) CCTK_REAL, intent(out) :: xeps(npoints) @@ -377,8 +382,8 @@ subroutine EOS_Omni_EOS_eps_from_press(eoskey,keytemp,npoints,& end subroutine EOS_Omni_EOS_eps_from_press -subroutine EOS_Omni_EOS_RestMassDensityFromEpsPress(eoskey,keytemp,npoints,& - rho,eps,temp,ye,press,keyerr,anyerr) +subroutine EOS_Omni_EOS_RestMassDensityFromEpsPress(eoskey,keytemp,rf_precision,& + npoints,rho,eps,temp,ye,press,keyerr,anyerr) use EOS_Omni_Module implicit none @@ -387,6 +392,7 @@ subroutine EOS_Omni_EOS_RestMassDensityFromEpsPress(eoskey,keytemp,npoints,& CCTK_INT, intent(in) :: eoskey,keytemp,npoints CCTK_INT, intent(out) :: keyerr(npoints) CCTK_INT, intent(out) :: anyerr + CCTK_REAL, intent(in) :: rf_precision CCTK_REAL, intent(in) :: ye(npoints),press(npoints),eps(npoints) CCTK_REAL, intent(inout) :: rho(npoints),temp(npoints) -- cgit v1.2.3