CalculateEntropy_DGModel1D Subroutine

public subroutine CalculateEntropy_DGModel1D(this)

Arguments

TypeIntentOptionalAttributesName
class(DGModel1D), intent(inout) :: this

Calls

proc~~calculateentropy_dgmodel1d~~CallsGraph proc~calculateentropy_dgmodel1d CalculateEntropy_DGModel1D interface~hipmemcpy hipMemcpy proc~calculateentropy_dgmodel1d->interface~hipmemcpy proc~gpucheck gpuCheck proc~calculateentropy_dgmodel1d->proc~gpucheck

Contents


Source Code

  subroutine CalculateEntropy_DGModel1D(this)
    implicit none
    class(DGModel1D),intent(inout) :: this
    ! Local
    integer :: iel,i,ivar
    real(prec) :: e,s(1:this%solution%nvar),J

    call gpuCheck(hipMemcpy(c_loc(this%solution%interior), &
                            this%solution%interior_gpu,sizeof(this%solution%interior), &
                            hipMemcpyDeviceToHost))

    e = 0.0_prec
    do iel = 1,this%geometry%nelem
      do i = 1,this%solution%interp%N+1
        J = this%geometry%dxds%interior(i,iel,1)
        s(1:this%solution%nvar) = this%solution%interior(i,iel,1:this%solution%nvar)
        e = e+this%entropy_func(s)*J
      enddo
    enddo

    this%entropy = e

  endsubroutine CalculateEntropy_DGModel1D