pure function riemannflux1d_advection_diffusion_1d_t(this,sL,sR,dsdx,nhat) result(flux)
class(advection_diffusion_1d_t),intent(in) :: this
real(prec),intent(in) :: sL(1:this%solution%nvar)
real(prec),intent(in) :: sR(1:this%solution%nvar)
real(prec),intent(in) :: dsdx(1:this%solution%nvar)
real(prec),intent(in) :: nhat
real(prec) :: flux(1:this%solution%nvar)
! Local
integer :: ivar
do ivar = 1,this%solution%nvar
flux(ivar) = 0.5_prec*(this%u*nhat*(sL(ivar)+sR(ivar))+ &
abs(this%u*nhat)*(sL(ivar)-sR(ivar)))- & ! advective flux
this%nu*dsdx(ivar)*nhat ! diffusive flux
enddo
endfunction riemannflux1d_advection_diffusion_1d_t