Clocks are essential to keep things synchronized. This is also the case in Octopus, where instances of the iteration_counter_t type are used to ensure that different systems stay in sync during time propagation ot iterations. 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 iteration_counter_t
typeiteration_counter_tinteger::iteration=0!< the local iteration counter
integer(int64)::step=-1!< how many global iterations correspond to one local iteration
integer(int64)::global_iteration=0!< the iteration counter in the global referece frame
procedure(get_value),pointer,public::value=>null()!< function returning some meaninful "value" for the counter in the global reference frame (e.g., the time of a clock)
containsprocedure::set=>iteration_counter_set!< set the counter to the value given by another counter
procedure::counter=>iteration_counter_counter!< get value of the counter
procedure::global_step=>iteration_counter_global_stepprocedure::reset=>iteration_counter_reset!< set the counter back to zero
procedure::add=>iteration_counter_addprocedure::subtract=>iteration_counter_subtractprocedure::is_equal=>iteration_counter_is_equalprocedure::is_different=>iteration_counter_is_differentprocedure::is_earlier=>iteration_counter_is_earlierprocedure::is_later=>iteration_counter_is_laterprocedure::is_equal_or_earlier=>iteration_counter_is_equal_or_earlierprocedure::is_equal_or_later=>iteration_counter_is_equal_or_laterprocedure::restart_write=>iteration_counter_restart_writeprocedure::restart_read=>iteration_counter_restart_read! Operators
generic::operator(+)=>addgeneric::operator(-)=>subtractgeneric::operator(.eq.)=>is_equalgeneric::operator(/=)=>is_differentgeneric::operator(.lt.)=>is_earliergeneric::operator(.gt.)=>is_latergeneric::operator(.le.)=>is_equal_or_earliergeneric::operator(.ge.)=>is_equal_or_laterendtypeiteration_counter_t