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(DGModel3D_t), | intent(inout) | :: | this | |||
real(kind=prec), | intent(in), | optional | :: | dt |
subroutine UpdateSolution_DGModel3D_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(DGModel3D_t),intent(inout) :: this
real(prec),optional,intent(in) :: dt
! Local
real(prec) :: dtLoc
integer :: i,j,k,iVar,iEl
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, &
k=1:this%solution%N+1,iel=1:this%mesh%nElem,ivar=1:this%solution%nVar)
this%solution%interior(i,j,k,iEl,iVar) = &
this%solution%interior(i,j,k,iEl,iVar)+ &
dtLoc*this%dSdt%interior(i,j,k,iEl,iVar)
enddo
endsubroutine UpdateSolution_DGModel3D_t