Local Lax-Friedrichs (Rusanov) Riemann flux for linear advection. lambda_max = sqrt(u^2 + v^2 + w^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) | |||
| real(kind=prec), | intent(in) | :: | dsdx(1:this%nvar,1:3) | |||
| real(kind=prec), | intent(in) | :: | nhat(1:3) |
pure function riemannflux3d_ECAdvection3D_t(this,sL,sR,dsdx,nhat) result(flux)
!! Local Lax-Friedrichs (Rusanov) Riemann flux for linear advection.
!! lambda_max = sqrt(u^2 + v^2 + w^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),intent(in) :: dsdx(1:this%nvar,1:3)
real(prec),intent(in) :: nhat(1:3)
real(prec) :: flux(1:this%nvar)
! Local
real(prec) :: un,lam
un = this%u*nhat(1)+this%v*nhat(2)+this%w*nhat(3)
lam = sqrt(this%u*this%u+this%v*this%v+this%w*this%w)
flux(1) = 0.5_prec*(un*(sL(1)+sR(1))-lam*(sR(1)-sL(1)))
if(.false.) flux(1) = flux(1)+dsdx(1,1) ! suppress unused-dummy-argument warning
endfunction riemannflux3d_ECAdvection3D_t