tem_time_ge_trigger Function

public elemental function tem_time_ge_trigger(time, trigger) result(ge)

Compare (>=) a complete time defintion against a trigger.

This returns true, if any of the time definitions in time is greater or equal to the corresponding time given in trigger. The time argument should be completely defined, while the trigger might have some of its definitions set to never. Due to this definition this comparison operator is not useful to define a unique ordering of time definitions!

Arguments

Type IntentOptional Attributes Name
type(tem_time_type), intent(in) :: time

A fully defined time definition (all components should have meaningful settings).

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

A comparison time definition, where some entries might be set to never. If any of the time components is larger, the result will be true.

Return Value logical

Result of the comparison, true if any of the time specifications in time is larger or equal to the ones in trigger.


Called by

proc~~tem_time_ge_trigger~~CalledByGraph proc~tem_time_ge_trigger tem_time_ge_trigger proc~tem_timecontrol_triggered tem_timeControl_triggered proc~tem_timecontrol_triggered->proc~tem_time_ge_trigger proc~tem_timecontrol_align_trigger tem_timeControl_align_trigger proc~tem_timecontrol_align_trigger->proc~tem_time_ge_trigger proc~tem_timecontrol_globaltriggered tem_timeControl_globalTriggered proc~tem_timecontrol_globaltriggered->proc~tem_timecontrol_triggered proc~tem_simcontrol_syncupdate tem_simControl_syncUpdate proc~tem_simcontrol_syncupdate->proc~tem_timecontrol_triggered proc~tem_timecontrol_update tem_timeControl_update proc~tem_simcontrol_syncupdate->proc~tem_timecontrol_update proc~tem_timecontrol_update->proc~tem_timecontrol_triggered proc~tem_load_restart tem_load_restart proc~tem_load_restart->proc~tem_timecontrol_align_trigger proc~tem_timecontrol_check tem_timeControl_check proc~tem_timecontrol_check->proc~tem_timecontrol_globaltriggered proc~tem_timecontrol_check->proc~tem_timecontrol_update proc~tem_convergence_check tem_convergence_check proc~tem_convergence_check->proc~tem_timecontrol_check proc~tem_tracking_has_triggered tem_tracking_has_triggered proc~tem_tracking_has_triggered->proc~tem_timecontrol_check

Contents

Source Code


Source Code

  elemental function tem_time_ge_trigger(time, trigger) result(ge)
    ! -------------------------------------------------------------------- !
    !> A fully defined time definition (all components should have meaningful
    !! settings).
    type(tem_time_type), intent(in) :: time

    !> A comparison time definition, where some entries might be set to never.
    !! If any of the time components is larger, the result will be true.
    type(tem_time_type), intent(in) :: trigger

    !> Result of the comparison, true if any of the time specifications in time
    !! is larger or equal to the ones in trigger.
    logical :: ge
    ! -------------------------------------------------------------------- !
    ! -------------------------------------------------------------------- !

    ge = (      (time%sim   >= trigger%sim)   &
      &    .or. (time%iter  >= trigger%iter)  &
      &    .or. (time%clock >= trigger%clock) )

  end function tem_time_ge_trigger