22 use,
intrinsic :: iso_fortran_env
52 real(real64),
parameter :: CLOCK_MINIMUM_DT = 1.0e-13_real64
74 type(iteration_counter_t)
pure function clock_constructor(time_step, initial_iteration) result(clock)
75 real(real64),
optional,
intent(in) :: time_step
76 integer,
optional,
intent(in) :: initial_iteration
78 if (
present(initial_iteration))
then
79 clock%iteration = initial_iteration
81 if (
present(time_step))
then
82 if (time_step >
m_zero)
then
83 clock%step = int(time_step/clock_minimum_dt, int64)
88 clock%global_iteration = clock%step * clock%iteration
96 class(iteration_counter_t),
intent(in) :: this
type(iteration_counter_t) pure function clock_constructor(time_step, initial_iteration)
Initialize the clock with a given time step.
pure real(real64) function clock_time(this)
real(real64), parameter, public clock_minimum_dt
This CLOCK_MINIMUM_DT parameter defines what is the time-step in the common reference frame of all cl...
real(real64), parameter, public m_zero