CalculateTendency_ESAtmo3D Subroutine

public subroutine CalculateTendency_ESAtmo3D(this)

GPU-resident tendency for ESAtmo3D. The inviscid pipeline is identical to ECDGModel3D's GPU CalculateTendency; if either nu or kappa is positive, the constant-coefficient Laplacian divergence (BR1 weak-form) is then accumulated into fluxDivergence before forming dSdt.

Arguments

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

Calls

proc~~calculatetendency_esatmo3d~~CallsGraph proc~calculatetendency_esatmo3d CalculateTendency_ESAtmo3D interface~ecdgsurfacecontribution_3d_gpu ECDGSurfaceContribution_3D_gpu proc~calculatetendency_esatmo3d->interface~ecdgsurfacecontribution_3d_gpu interface~accumulatefield_gpu AccumulateField_gpu proc~calculatetendency_esatmo3d->interface~accumulatefield_gpu interface~calculatedsdt_gpu CalculateDSDt_gpu proc~calculatetendency_esatmo3d->interface~calculatedsdt_gpu

Contents


Source Code

  subroutine CalculateTendency_ESAtmo3D(this)
    !! GPU-resident tendency for ESAtmo3D. The inviscid pipeline is
    !! identical to ECDGModel3D's GPU CalculateTendency; if either nu
    !! or kappa is positive, the constant-coefficient Laplacian
    !! divergence (BR1 weak-form) is then accumulated into
    !! fluxDivergence before forming dSdt.
    implicit none
    class(ESAtmo3D),intent(inout) :: this
    ! Local
    integer :: ndof,ndof_diff

    call this%solution%BoundaryInterp()
    call this%solution%SideExchange(this%mesh)

    call this%PreTendency()
    call this%SetBoundaryCondition()

    if(this%gradient_enabled) then
      call this%CalculateSolutionGradient()
      call this%SetGradientBoundaryCondition()
      call this%solutionGradient%AverageSides()
    endif

    call this%SourceMethod()
    call this%BoundaryFlux()

    call this%TwoPointFluxMethod()

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

    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)

    if(this%nu > 0.0_prec .or. this%kappa > 0.0_prec) then
      call this%DiffusiveFluxMethod()
      call this%DiffusiveBoundaryFlux()
      call this%diffFlux%MappedDGDivergence(this%diffDiv%interior_gpu)
      ndof_diff = this%solution%nVar* &
                  this%mesh%nElem* &
                  (this%solution%interp%N+1)* &
                  (this%solution%interp%N+1)* &
                  (this%solution%interp%N+1)
      call AccumulateField_gpu(this%fluxDivergence%interior_gpu, &
                               this%diffDiv%interior_gpu, &
                               ndof_diff)
    endif

    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_ESAtmo3D