Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(advection_diffusion_1d_t), | intent(in) | :: | this | |||
real(kind=prec), | intent(in) | :: | s(1:this%solution%nvar) | |||
real(kind=prec), | intent(in) | :: | dsdx(1:this%solution%nvar) |
pure function flux1d_advection_diffusion_1d_t(this,s,dsdx) result(flux)
class(advection_diffusion_1d_t),intent(in) :: this
real(prec),intent(in) :: s(1:this%solution%nvar)
real(prec),intent(in) :: dsdx(1:this%solution%nvar)
real(prec) :: flux(1:this%solution%nvar)
! Local
integer :: ivar
do ivar = 1,this%solution%nvar
flux(ivar) = this%u*s(ivar)-this%nu*dsdx(ivar) ! advective flux + diffusive flux
enddo
endfunction flux1d_advection_diffusion_1d_t