Set the simulation time (limited to the time range) and restart counting from it.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(SimulationClock), | intent(inout) | :: | self | |||
| real(kind=wp), | intent(in) | :: | t |
simulation time (s) |
||
| real(kind=wp), | intent(in), | optional | :: | wall |
wall time (s; default: wall_time()) |
recursive subroutine set_time(self, t, wall) class(SimulationClock), intent(inout) :: self real(wp), intent(in) :: t !! simulation time (s) real(wp), intent(in), optional :: wall !! wall time (s; default: wall_time()) if (associated(self%sync)) then call self%sync%set_time(t, wall) return end if self%time_ = max(self%t_min, min(self%t_max, t)) self%offset = self%time_ self%wall_ref = now(wall) self%started = .true. end subroutine set_time