Octopus
clock_oct_m Module Reference

Data Types

interface  clock_t
 

Functions/Subroutines

type(iteration_counter_t) pure function clock_constructor (time_step, initial_iteration)
 Initialize the clock with a given time step. More...
 
pure real(real64) function clock_time (this)
 

Variables

real(real64), parameter, public clock_minimum_dt = 1.0e-13_real64
 This CLOCK_MINIMUM_DT parameter defines what is the time-step in the common reference frame of all clocks. It means that all the time-steps must be multiples of this one. This parameter also controls what is the maximum time a clock can have: More...
 

Function/Subroutine Documentation

◆ clock_constructor()

type(iteration_counter_t) pure function clock_oct_m::clock_constructor ( real(real64), intent(in), optional  time_step,
integer, intent(in), optional  initial_iteration 
)
private

Initialize the clock with a given time step.

The internal clock counter starts at zero or if the optional argument initial_value is given at the value of initial_value.

Note that the time step used by the clock might not be identical to the requested time step. This is because we need to enforce the time step to be a multiple of the minimum time step or otherwise the calculated time will not be an exact multiple of the time step.

Definition at line 163 of file clock.F90.

◆ clock_time()

pure real(real64) function clock_oct_m::clock_time ( class(iteration_counter_t), intent(in)  this)
private

Definition at line 184 of file clock.F90.

Variable Documentation

◆ clock_minimum_dt

real(real64), parameter, public clock_oct_m::clock_minimum_dt = 1.0e-13_real64

This CLOCK_MINIMUM_DT parameter defines what is the time-step in the common reference frame of all clocks. It means that all the time-steps must be multiples of this one. This parameter also controls what is the maximum time a clock can have:

maximum time = huge(iteration)*CLOCK_MINIMUM_DT

where "iteration" is the iteration counter in the common reference frame from iteration_counter_t.

For 64 bit signed integers, huge(iteration) = 9223372036854775807, and if CLOCK_MINIMUM_DT = 1.0e-13, then one gets

maximum time = 922337.20368547761

If times are given in atomic units of time, then

maximum time ~= 22310 femtosecond

Definition at line 145 of file clock.F90.