Exchange interface traces, fill the interface exterior states, then compute the tendency of every set with elements on this rank, in set order. See the module documentation for the stage order.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(MultiSetModel3D_t), | intent(inout) | :: | this |
subroutine CalculateTendency_MultiSetModel3D_t(this)
!! Exchange interface traces, fill the interface exterior states, then compute the
!! tendency of every set with elements on this rank, in set order. See the module
!! documentation for the stage order.
implicit none
class(MultiSetModel3D_t),intent(inout) :: this
! Local
integer :: k
if(.not. this%interfacesReady) then
error stop "MultiSetModel3D : call SetupInterfaces before stepping"
endif
call this%SyncSetClocks()
call this%PreTendencyHook() ! User-supplied; runs before the interface traces are gathered
if(this%nInterfaceFaces > 0) then
do k = 1,this%nSets
if(this%iface%setFaceStart(k+1) > this%iface%setFaceStart(k)) then
call this%sets(k)%model%solution%BoundaryInterp()
endif
enddo
call this%iface%Exchange(this%traces)
do k = 1,this%nSets
if(this%iface%setFaceStart(k+1) > this%iface%setFaceStart(k)) then
call this%FillInterfaceBoundary(k)
endif
enddo
endif
do k = 1,this%nSets
if(this%sets(k)%mesh%nElem > 0) call this%sets(k)%model%CalculateTendency()
enddo
endsubroutine CalculateTendency_MultiSetModel3D_t