pause Subroutine

private recursive subroutine pause(self, paused, wall)

Pause (true) or resume (false) the simulation time.

Type Bound

SimulationClock

Arguments

Type IntentOptional Attributes Name
class(SimulationClock), intent(inout) :: self
logical, intent(in) :: paused

true: pause; false: resume

real(kind=wp), intent(in), optional :: wall

wall time (s; default: wall_time())


Calls

proc~~pause~~CallsGraph proc~pause SimulationClock%pause proc~set_time~4 SimulationClock%set_time proc~pause->proc~set_time~4 proc~set_time~4->proc~set_time~4 proc~now now proc~set_time~4->proc~now proc~wall_time wall_time proc~now->proc~wall_time

Source Code

    recursive subroutine pause(self, paused, wall)
        class(SimulationClock), intent(inout) :: self
        logical, intent(in) :: paused               !! true: pause; false: resume
        real(wp), intent(in), optional :: wall      !! wall time (s; default: wall_time())
        if (associated(self%sync)) then
            call self%sync%pause(paused, wall)
            return
        end if
        self%paused_ = paused
        call self%set_time(self%time_, wall)
    end subroutine pause