CalculateTendency_ECDGModel3D Subroutine

public subroutine CalculateTendency_ECDGModel3D(this)

Arguments

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

Calls

proc~~calculatetendency_ecdgmodel3d~~CallsGraph proc~calculatetendency_ecdgmodel3d CalculateTendency_ECDGModel3D interface~ecdgsurfacecontribution_3d_gpu ECDGSurfaceContribution_3D_gpu proc~calculatetendency_ecdgmodel3d->interface~ecdgsurfacecontribution_3d_gpu interface~calculatedsdt_gpu CalculateDSDt_gpu proc~calculatetendency_ecdgmodel3d->interface~calculatedsdt_gpu

Contents


Source Code

  subroutine CalculateTendency_ECDGModel3D(this)
    implicit none
    class(ECDGModel3D),intent(inout) :: this
    ! Local
    integer :: ndof

    call this%solution%BoundaryInterp()

    ! Post the halo exchange for the prognostic variables; the MPI messages
    ! are in flight while the hooks, boundary conditions, source, and the
    ! two-point volume flux and its divergence below execute.
    call this%solution%SideExchangeStart(this%mesh,this%nstepped)

    call this%PreTendencyHook()
    call this%SetBoundaryCondition()

    if(this%gradient_enabled) then
      ! The BR gradient consumes extBoundary (through the side averages), so
      ! the exchange must complete before the gradient is computed.
      call this%solution%SideExchangeFinish(this%mesh)
      call this%CalculateSolutionGradient()
      call this%SetGradientBoundaryCondition()
      call this%solutionGradient%AverageSides()
    endif

    call this%SourceMethod()
    call this%TwoPointFluxMethod()

    call this%twoPointFlux%MappedDivergence(this%fluxDivergence%interior_gpu)

    ! BoundaryFlux is the first consumer of extBoundary; the two-point volume
    ! flux and its divergence above overlap with the halo exchange (a no-op
    ! wait when gradients already finished it). BoundaryFlux writes only the
    ! Riemann trace (flux boundarynormal), disjoint from the volume-term
    ! outputs, so this reordering does not change any floating-point results.
    call this%solution%SideExchangeFinish(this%mesh)
    call this%BoundaryFlux()

    call ECDGSurfaceContribution_3D_gpu( &
      this%flux%boundarynormal_gpu, &
      this%geometry%J%interior_gpu, &
      this%solution%interp%bMatrix_gpu, &
      this%solution%interp%qWeights_gpu, &
      this%fluxDivergence%interior_gpu, &
      this%solution%interp%N,this%solution%nVar,this%mesh%nElem)

    ndof = this%solution%nVar* &
           this%mesh%nElem* &
           (this%solution%interp%N+1)* &
           (this%solution%interp%N+1)* &
           (this%solution%interp%N+1)

    call CalculateDSDt_gpu(this%fluxDivergence%interior_gpu, &
                           this%source%interior_gpu, &
                           this%dSdt%interior_gpu,ndof)

  endsubroutine CalculateTendency_ECDGModel3D