twopointflux2d_ECAdvection2D_t Function

public pure function twopointflux2d_ECAdvection2D_t(this, sL, sR) result(flux)

Arithmetic-mean two-point flux for linear advection. Entropy-conserving with respect to eta(u) = u^2/2.

Arguments

TypeIntentOptionalAttributesName
class(ECAdvection2D_t), intent(in) :: this
real(kind=prec), intent(in) :: sL(1:this%nvar)
real(kind=prec), intent(in) :: sR(1:this%nvar)

Return Value real(kind=prec)(1:this%nvar,1:2)


Contents


Source Code

  pure function twopointflux2d_ECAdvection2D_t(this,sL,sR) result(flux)
    !! Arithmetic-mean two-point flux for linear advection.
    !! Entropy-conserving with respect to eta(u) = u^2/2.
    class(ECAdvection2D_t),intent(in) :: this
    real(prec),intent(in) :: sL(1:this%nvar)
    real(prec),intent(in) :: sR(1:this%nvar)
    real(prec) :: flux(1:this%nvar,1:2)
    ! Local
    real(prec) :: savg

    savg = 0.5_prec*(sL(1)+sR(1))
    flux(1,1) = this%u*savg
    flux(1,2) = this%v*savg

  endfunction twopointflux2d_ECAdvection2D_t