pointwise evaluations used in con2prim compute pointwise value for pressure p and dpdxi
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| double precision, | intent(in) | :: | xicurrent | |||
| double precision, | intent(in) | :: | lfac | |||
| double precision, | intent(in) | :: | d | |||
| double precision, | intent(in) | :: | dlfacdxi | |||
| double precision, | intent(out) | :: | p | |||
| double precision, | intent(out) | :: | dpdxi |
pure subroutine FuncPressure_eos(xicurrent,lfac,d,dlfacdxi,p,dpdxi) double precision, intent(in) :: xicurrent,lfac,d,dlfacdxi double precision, intent(out) :: p,dpdxi ! .. local .. double precision :: rho,h,E,dhdxi,rhotoE double precision :: dpdchi,dEdxi ! rhoh here called h h=xicurrent/(lfac**2) rho=d/lfac E = (h+dsqrt(h**2+(phys_gamma**2-one)*rho**2)) & /(phys_gamma+one) ! output pressure rhotoE = rho/E p = half*(phys_gamma-1.0d0)*(E-rho*rhotoE) dhdxi = one/(lfac**2)-2.0d0*xicurrent/(lfac**2)*dlfacdxi/lfac dEdxi=(dhdxi+(h*dhdxi-(phys_gamma**2-one)*rho**2*dlfacdxi/lfac)& /dsqrt(h**2+(phys_gamma**2-one)*rho**2))& /(phys_gamma+one) ! output pressure derivative to xi dpdxi=half*(phys_gamma-1.0d0)*(2.0d0*rho*rhotoE*dlfacdxi/lfac+& (one+rhotoE**2)*dEdxi) end subroutine FuncPressure_eos