Nodes of different colours represent the following:
Solid arrows point from a submodule to the (sub)module which it is
descended from. Dashed arrows point from a module or program unit to
modules which it uses.
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.
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
subroutine get_flux(u,xC,flux_dim,flux)use mod_global_parameters,only:cmax_globalreal(dp),intent(in)::u(nw_phys)real(dp),intent(in)::xC(1:ndim)integer,intent(in)::flux_dimreal(dp),intent(out)::flux(nw_flux)real(dp)::pth,vel(1:ndim)pth=u(iw_e)vel(1)=u(iw_mom(1))/u(lfac_)vel(2)=u(iw_mom(2))/u(lfac_)vel(3)=u(iw_mom(3))/u(lfac_)! Density fluxflux(iw_rho)=u(iw_rho)*u(lfac_)*vel(flux_dim)! Momentum flux with pressure termflux(iw_mom(1))=u(xi_)*vel(1)*vel(flux_dim)flux(iw_mom(2))=u(xi_)*vel(2)*vel(flux_dim)flux(iw_mom(3))=u(xi_)*vel(3)*vel(flux_dim)flux(iw_mom(flux_dim))=flux(iw_mom(flux_dim))+pth! Energy fluxflux(iw_e)=vel(flux_dim)*(u(xi_)-u(iw_rho)*u(lfac_))! Tracer flux. Note that tracers stay conservative.flux(tracer(1))=u(tracer(1))*vel(flux_dim)end subroutine get_flux