One-face LLF/Rusanov numerical flux from primitive L/R states. phi(nw_flux) is the adaptive-diffusion reduction factor; only present when FLUX_AD is defined.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=dp), | intent(inout) | :: | uL(nw_phys) | |||
| real(kind=dp), | intent(inout) | :: | uR(nw_phys) | |||
| real(kind=dp), | intent(in) | :: | xC(ndim) | |||
| integer, | intent(in) | :: | flux_dim | |||
| real(kind=dp), | intent(out) | :: | F(nw_flux) | |||
| real(kind=dp), | intent(in) | :: | phi(nw_flux) |
subroutine riemann_llf_prim(uL, uR, xC, flux_dim, F, phi) real(dp), intent(inout) :: uL(nw_phys), uR(nw_phys) real(dp), intent(in) :: xC(ndim) integer, intent(in) :: flux_dim real(dp), intent(out) :: F(nw_flux) real(dp), intent(in) :: phi(nw_flux) real(dp) :: flux_l(nw_flux), flux_r(nw_flux) real(dp) :: wL, wR, wmax call get_flux(uL, xC, flux_dim, flux_l) call get_flux(uR, xC, flux_dim, flux_r) wL = get_cmax(uL, xC, flux_dim) wR = get_cmax(uR, xC, flux_dim) wmax = max(abs(wL), abs(wR)) call to_conservative(uL) call to_conservative(uR) F = 0.5_dp * ((flux_l + flux_r) - wmax * (uR(1:nw_flux) - uL(1:nw_flux)) * phi) end subroutine riemann_llf_prim