Clocks are essential to keep things synchronized. This is also the case in Octopus, where instances of the clock_t type are used to ensure that different systems stay in sync during time propagation. Clocks are used to determine whether quantities or interactions need to be updated in a propagation step.
The smallest unit of time in Octopus is one tick.
Definition of clock_t
type clock_tprivate
integer::tick!< internal clock counter which is incremented by one when the clock is advanced
FLOAT::time_step!< physical simulation time increment which corresponds to a single clock tick
FLOAT::time_!< physical simulation time
contains
procedure::print=>clock_print!< print internal state of the clock
procedure::print_str=>clock_print_str!< print internal state of the clock to a string
procedure::set_time=>clock_set_time!< set the clock only to the time of a given input clock
procedure::copy=>clock_copy!< set the clock to the state of a given input clock
procedure::get_tick=>clock_get_tick!< get value of internal clock counter
procedure::time=>clock_time!< get the current physical simulation time of the clock
procedure::reset=>clock_reset!< set the internal clock counter back to zero
procedure::clock_is_equalgeneric::operator(.eq.)=>clock_is_equalprocedure::clock_is_differentgeneric::operator(/=)=>clock_is_differentprocedure::clock_is_earliergeneric::operator(.lt.)=>clock_is_earlierprocedure::clock_is_latergeneric::operator(.gt.)=>clock_is_laterprocedure::clock_is_equal_or_earliergeneric::operator(.le.)=>clock_is_equal_or_earlierprocedure::clock_is_equal_or_latergeneric::operator(.ge.)=>clock_is_equal_or_laterprocedure::clock_copygeneric::assignment(=)=>clock_copyprocedure::clock_add_tickgeneric::operator(+)=>clock_add_tickprocedure::clock_subtract_tickgeneric::operator(-)=>clock_subtract_tickprocedure::restart_write=>clock_restart_writeprocedure::restart_read=>clock_restart_readend type clock_t