tem_timeformatter_iter_stamp Function

private function tem_timeformatter_iter_stamp(formatter, time) result(timeStamp)

Generate a time stamp from the iteration in the given time definition.

Arguments

Type IntentOptional Attributes Name
class(tem_timeformatter_type), intent(in) :: formatter

Formatting object to generate the time stamp

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

Time definition to create the stamp off.

Return Value character(len=labelLen)

String representation of the given simulation time.


Source Code

  function tem_timeformatter_iter_stamp(formatter, time) result(timeStamp)
    ! -------------------------------------------------------------------- !
    !> Formatting object to generate the time stamp
    class(tem_timeformatter_type), intent(in) :: formatter
    !> Time definition to create the stamp off.
    type(tem_time_type), intent(in) :: time

    !> String representation of the given simulation time.
    character(len=labelLen) :: timeStamp
    ! -------------------------------------------------------------------- !
    ! -------------------------------------------------------------------- !

    write(timeStamp, formatter%timeform) time%iter

    ! remove leading empty spaces in the timestamp
    timeStamp = adjustl(timeStamp)

  end function  tem_timeformatter_iter_stamp