lax_friedrichs_split Subroutine

private pure subroutine lax_friedrichs_split(q, flux, sign, gam)

Lax-Friedrichs flux splitting.

F^{+} = 0.5 * (F + alpha * Q), F^{-} = 0.5 * (F - alpha * Q) where alpha = max|lambda| = |u| + c (local wave speed estimate). See course notes, Sec. "Flux Splitting".

Arguments

Type IntentOptional Attributes Name
real(kind=wp), intent(in) :: q(:)
real(kind=wp), intent(out) :: flux(:)
integer, intent(in) :: sign

+1 for F^+, -1 for F^-

real(kind=wp), intent(in) :: gam

Ratio of specific heats