entropy_func_advection_diffusion_2d_t Function

public pure function entropy_func_advection_diffusion_2d_t(this, s) result(e)

Arguments

TypeIntentOptionalAttributesName
class(advection_diffusion_2d_t), intent(in) :: this
real(kind=prec), intent(in) :: s(1:this%solution%nvar)

Return Value real(kind=prec)


Contents


Source Code

  pure function entropy_func_advection_diffusion_2d_t(this,s) result(e)
    class(advection_diffusion_2d_t),intent(in) :: this
    real(prec),intent(in) :: s(1:this%solution%nvar)
    real(prec) :: e
    ! Local
    integer :: ivar

    e = 0.0_prec
    do ivar = 1,this%solution%nvar
      e = e+0.5_prec*s(ivar)*s(ivar)
    enddo

  endfunction entropy_func_advection_diffusion_2d_t