UpdateSolution_DGModel3D Subroutine

public subroutine UpdateSolution_DGModel3D(this, dt)

Computes a solution update as , where dt is either provided through the interface or taken as the Model's stored time step size (model % dt)

Arguments

TypeIntentOptionalAttributesName
class(DGModel3D), intent(inout) :: this
real(kind=prec), intent(in), optional :: dt

Calls

proc~~updatesolution_dgmodel3d~~CallsGraph proc~updatesolution_dgmodel3d UpdateSolution_DGModel3D interface~updatesolution_calculatedsdt_gpu UpdateSolution_CalculateDSDt_gpu proc~updatesolution_dgmodel3d->interface~updatesolution_calculatedsdt_gpu

Contents


Source Code

  subroutine UpdateSolution_DGModel3D(this,dt)
    !! Computes a solution update as , where dt is either provided through the interface
    !! or taken as the Model's stored time step size (model % dt)
    implicit none
    class(DGModel3D),intent(inout) :: this
    real(prec),optional,intent(in) :: dt
    ! Local
    real(prec) :: dtLoc
    integer :: ndof

    if(present(dt)) then
      dtLoc = dt
    else
      dtLoc = this%dt
    endif
    ! The stepped variables occupy the leading nstepped entries of the
    ! variable dimension (the slowest-varying index of the interior array),
    ! so restricting ndof to nstepped updates exactly variables 1:nstepped.
    ndof = this%nstepped* &
           this%solution%nelem* &
           (this%solution%interp%N+1)* &
           (this%solution%interp%N+1)* &
           (this%solution%interp%N+1)

    ! Fused tendency + Euler update (dSdt = source - fluxDivergence formed in
    ! registers, no separate CalculateDSDt pass).
    call UpdateSolution_CalculateDSDt_gpu(this%solution%interior_gpu,this%fluxDivergence%interior_gpu, &
                                          this%source%interior_gpu,dtLoc,ndof)

  endsubroutine UpdateSolution_DGModel3D