tem_timeformatter_sim_stamp Function

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

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

This basically generates a string identifying the solution time and writing it in a meaningful format, so that it can be easily recognized.

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_sim_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%sim

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

  end function  tem_timeformatter_sim_stamp