subroutine CalculateTendency_DGModel2D_t(this)
implicit none
class(DGModel2D_t),intent(inout) :: this
! Local
integer :: i,j,iEl,iVar
call this%solution%BoundaryInterp()
call this%solution%SideExchange(this%mesh)
! populate the solution % extBoundary attribute on nonconforming
! (mortar) interfaces
if(this%mesh%nMortars > 0) then
call this%solution%MortarExchange(this%mesh)
endif
call this%PreTendencyHook() ! User-supplied
call this%SetBoundaryCondition() ! User-supplied
if(this%gradient_enabled) then
call this%CalculateSolutionGradient()
call this%SetGradientBoundaryCondition() ! User-supplied
call this%solutionGradient%AverageSides()
endif
call this%SourceMethod() ! User supplied
call this%BoundaryFlux() ! User supplied
! On mortar interfaces, replace the big side's surface-flux integrand with the
! projection of the small sides' integrands so that the interface is conservative
if(this%mesh%nMortars > 0) then
call this%flux%MortarFluxCollect(this%mesh)
endif
call this%FluxMethod() ! User supplied
call this%flux%MappedDGDivergence(this%fluxDivergence%interior)
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%dSdt%interior(i,j,iEl,iVar) = &
this%source%interior(i,j,iEl,iVar)- &
this%fluxDivergence%interior(i,j,iEl,iVar)
enddo
endsubroutine CalculateTendency_DGModel2D_t