Nodes of different colours represent the following:
Solid arrows point from a procedure to one which it calls. Dashed
arrows point from an interface to procedures which implement that interface.
This could include the module procedures in a generic interface or the
implementation in a submodule of an interface in a parent module.
Source Code
pure subroutine to_conservative(u)real(dp),intent(inout)::u(nw_phys)real(dp)::rho,rhoh,pthreal(dp)::E,E_thrhoh=(u(iw_mom(1))**2+u(iw_mom(2))**2+u(iw_mom(3))**2)u(lfac_)=dsqrt(1.0d0+rhoh)rho=u(iw_rho)pth=u(iw_e)!! begin: call srhd_get_enthalpy_eos(rho,pth,rhoh)if(srhd_eos)thenE_th=pth*inv_gamma_1E=E_th+dsqrt(E_th**2+rho**2)! writing rho/E on purpose, for numerics rhoh=0.5_dp*((srhd_gamma+1.0_dp)*E&-gamma_1*rho*(rho/E))elserhoh=rho+gamma_to_gamma_1*pthend if!! end: call srhd_get_enthalpy_eos(rho,pth,rhoh)rhoh=rhoh*u(lfac_)u(xi_)=u(lfac_)*rhohu(iw_rho)=u(lfac_)*rhou(iw_mom(1))=rhoh*u(iw_mom(1))u(iw_mom(2))=rhoh*u(iw_mom(2))u(iw_mom(3))=rhoh*u(iw_mom(3))u(iw_e)=u(xi_)-pth-u(iw_rho)end subroutine to_conservative