Get the maximum of two time definitions.
This is simply the maximum in each component.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(tem_time_type), | intent(in) | :: | left |
First time operant to compare. |
||
type(tem_time_type), | intent(in) | :: | right |
Second time operant to compare. |
Resulting maximum time of left and right.
elemental function tem_time_max(left, right) result(res)
! -------------------------------------------------------------------- !
!> First time operant to compare.
type(tem_time_type), intent(in) :: left
!> Second time operant to compare.
type(tem_time_type), intent(in) :: right
!> Resulting maximum time of left and right.
type(tem_time_type) :: res
! -------------------------------------------------------------------- !
! -------------------------------------------------------------------- !
res%sim = max(left%sim, right%sim)
res%iter = max(left%iter, right%iter)
res%clock = max(left%clock, right%clock)
end function tem_time_max