FWHUpate Subroutine

public subroutine FWHUpate(self, mesh, t, iter, isFromFile)

Type Bound

FWHClass

Arguments

Type IntentOptional Attributes Name
class(FWHClass) :: self
class(HexMesh) :: mesh
real(kind=RP), intent(in) :: t
integer, intent(in) :: iter
logical, intent(in), optional :: isFromFile

Source Code

    Subroutine FWHUpate(self, mesh, t, iter, isFromFile)

        implicit none

        class(FWHClass)                                     :: self
        class(HexMesh)                                      :: mesh
        real(kind=RP), intent(in)                           :: t
        integer, intent(in)                                 :: iter
        logical, intent(in), optional                       :: isFromFile

!       ---------------
!       Local variables
!       ---------------
!
        integer                                             :: i 
        logical                                             :: prolong

!       Check if is activated
!       ------------------------
        if (.not. self % isActive) return

!       Check if prolong is necessary
!       ------------------------
        if (present(isFromFile)) then
            prolong = .not. isFromFile
        else
            prolong = .TRUE.
        end if 
!
!       Move to next buffer line
!       ------------------------
        self % bufferLine = self % bufferLine + 1
!
!       Save time and iteration
!       -----------------------
        self % t       ( self % bufferLine )  = t
        self % iter    ( self % bufferLine )  = iter
!
!       Save Solution to elements faces of fwh surface
!       -----------------------
        if (prolong) call SourceProlongSolution(surfacesMesh % zones(SURFACE_TYPE_FWH), mesh, surfacesMesh % elementSide(:,1))

!       see if its regular or interpolated
!       -----------------------
        if (.not. self % firstWrite) then
            do i = 1, self % numberOfObservers
                call self % observers(i) % update(mesh, self % isSolid, self % bufferLine, self % interpolate)
            end do 
        else
            do i = 1, self % numberOfObservers
                call self % observers(i) % updateOneStep(mesh, self % bufferLine, self % isSolid, t)
            end do 
        end if

    End Subroutine FWHUpate