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)
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(DGModel2D_t), | intent(inout) | :: | this | |||
real(kind=prec), | intent(in), | optional | :: | dt |
subroutine UpdateSolution_DGModel2D_t(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(DGModel2D_t),intent(inout) :: this
real(prec),optional,intent(in) :: dt
! Local
real(prec) :: dtLoc
integer :: i,j,iEl,iVar
if(present(dt)) then
dtLoc = dt
else
dtLoc = this%dt
endif
do concurrent(i=1:this%solution%N+1,j=1:this%solution%N+1, &
iel=1:this%mesh%nElem,ivar=1:this%solution%nVar)
this%solution%interior(i,j,iEl,iVar) = &
this%solution%interior(i,j,iEl,iVar)+ &
dtLoc*this%dSdt%interior(i,j,iEl,iVar)
enddo
endsubroutine UpdateSolution_DGModel2D_t