Arithmetic-mean two-point flux for linear advection. Entropy-conserving with respect to eta(u) = u^2/2.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(ECAdvection3D_t), | intent(in) | :: | this | |||
| real(kind=prec), | intent(in) | :: | sL(1:this%nvar) | |||
| real(kind=prec), | intent(in) | :: | sR(1:this%nvar) |
pure function twopointflux3d_ECAdvection3D_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(ECAdvection3D_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:3)
! Local
real(prec) :: savg
savg = 0.5_prec*(sL(1)+sR(1))
flux(1,1) = this%u*savg
flux(1,2) = this%v*savg
flux(1,3) = this%w*savg
endfunction twopointflux3d_ECAdvection3D_t