outflow_ghost Subroutine

private subroutine outflow_ghost(state, q_wall, q_penult, q_ghost)

'outflow' ghost: first-order linear extrapolation with a positivity guard.

ghost = 2*boundary - penultimate (LeVeque 2002, Sec. 7.3). Falls back to zero-gradient (q_wall) when the extrapolation yields a non-physical ghost state (negative density or pressure).

Arguments

Type IntentOptional Attributes Name
type(solver_state_t), intent(in) :: state
real(kind=wp), intent(in) :: q_wall(3)
real(kind=wp), intent(in) :: q_penult(3)
real(kind=wp), intent(out) :: q_ghost(3)