tem_timeControl_start_at_sim Subroutine

public subroutine tem_timeControl_start_at_sim(me, now)

Set the begin of the control interval in me to now.

Setting only the simulation time, while putting all other counters to never avoids the introduction of new dependencies, that might result in the need for communication.

Arguments

Type IntentOptional Attributes Name
type(tem_timeControl_type), intent(inout) :: me

Time control that should be started at now.

type(tem_time_type), intent(in) :: now

Time that should be used as starting point for the time control.


Source Code

  subroutine tem_timeControl_start_at_sim(me, now)
    ! -------------------------------------------------------------------- !
    !> Time control that should be started at now.
    type(tem_timeControl_type), intent(inout) :: me

    !> Time that should be used as starting point for the time control.
    type(tem_time_type), intent(in) :: now
    ! -------------------------------------------------------------------- !
    ! -------------------------------------------------------------------- !

    me%min = tem_time_never()
    if ( me%interval%clock < huge(me%interval%clock) ) then
      me%min%clock = now%clock
    end if
    me%min%iter = now%iter
    me%min%sim = now%sim
    me%trigger = me%min

    ! As me%min is set to now, it is also reached.
    me%min_reached = .true.

  end subroutine tem_timeControl_start_at_sim