22 integer,
intent(in) :: ixI^L, ixO^L, ixL^L, ixR^L
23 double precision,
intent(in) :: w(ixI^S, nw), d2w(ixG^T, 1:nwflux)
24 double precision,
intent(inout) :: drho(ixG^T), dp(ixG^T)
29 dp(ixo^s) = abs(d2w(ixo^s,
e_))/min(w(ixl^s,
e_), w(ixr^s,
e_))
31 call mpistop(
"PPM with flatcd=.true. can not be used with -eos = iso !")
35 subroutine hd_ppm_flatsh(ixI^L,ixO^L,ixLL^L,ixL^L,ixR^L,ixRR^L,idims,w,drho,dp,dv)
39 integer,
intent(in) :: ixI^L, ixO^L, ixLL^L, ixL^L, ixR^L, ixRR^L
40 integer,
intent(in) :: idims
41 double precision,
intent(in) :: w(ixI^S, nw)
42 double precision,
intent(inout) :: drho(ixG^T), dp(ixG^T), dv(ixG^T)
43 double precision :: v(ixG^T)
47 where (abs(w(ixrr^s,
e_)-w(ixll^s,
e_))>smalldouble)
48 drho(ixo^s) = abs((w(ixr^s,
e_)-w(ixl^s,
e_))&
49 /(w(ixrr^s,
e_)-w(ixll^s,
e_)))
58 dp(ixo^s) = abs(w(ixr^s,
e_)-w(ixl^s,
e_))&
59 /(w(ixo^s,
rho_)*dp(ixo^s))
60 v(ixi^s) = w(ixi^s,
mom(idims))
61 call gradient(v, ixi^l, ixo^l, idims, dv)
63 call mpistop(
"PPM with flatsh=.true. can not be used with -eos = iso !")
subroutine mpistop(message)
Exit MPI-AMRVAC with an error message.
Module with geometry-related routines (e.g., divergence, curl)
subroutine gradient(q, ixIL, ixOL, idir, gradq)
Calculate gradient of a scalar q within ixL in direction idir.
This module contains definitions of global parameters and variables and some generic functions/subrou...
Hydrodynamics physics module.
logical, public, protected hd_energy
Whether an energy equation is used.
integer, public, protected e_
Index of the energy density (-1 if not present)
double precision, public hd_gamma
The adiabatic index.
integer, dimension(:), allocatable, public, protected mom
Indices of the momentum density.
integer, public, protected rho_
Index of the density (in the w array)
Hydrodynamics PPM module.
subroutine hd_ppm_flatcd(ixIL, ixOL, ixLL, ixRL, w, d2w, drho, dp)
subroutine hd_ppm_flatsh(ixIL, ixOL, ixLLL, ixLL, ixRL, ixRRL, idims, w, drho, dp, dv)
subroutine, public hd_ppm_init()
procedure(sub_ppm_flatcd), pointer phys_ppm_flatcd
procedure(sub_ppm_flatsh), pointer phys_ppm_flatsh