22 use,
intrinsic :: iso_fortran_env
52 real(real64),
parameter :: CLOCK_MINIMUM_DT = 1.0e-13_real64
70 type(iteration_counter_t)
pure function clock_constructor(time_step, initial_iteration) result(clock)
71 real(real64),
optional,
intent(in) :: time_step
72 integer,
optional,
intent(in) :: initial_iteration
74 if (
present(initial_iteration))
then
75 clock%iteration = initial_iteration
77 if (
present(time_step))
then
78 if (time_step >
m_zero)
then
79 clock%step = int(time_step/clock_minimum_dt, int64)
84 clock%global_iteration = clock%step * clock%iteration
92 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