Octopus
iteration_counter_oct_m::iteration_counter_t Interface Reference

This class implements the iteration counter used by the multisystem algorithms. As any iteration counter, there is an integer that keeps track of which iteration is being executed. Because algorithms might advance at different paces, one then needs a common reference frame to compare iterations of different algorithms. We thus defined three integers: More...

Detailed Description

This class implements the iteration counter used by the multisystem algorithms. As any iteration counter, there is an integer that keeps track of which iteration is being executed. Because algorithms might advance at different paces, one then needs a common reference frame to compare iterations of different algorithms. We thus defined three integers:

  • iteration: the local counter; it advances by 1 when the algorithm moves to the next iteration
  • step: how many iterations in the common reference frame correspond to one iteration in the local frame
  • global_iteration: the counter in the common reference frame; it advances by "step" whenever the local counter advances by 1

One of the above components is redundant, as they are not all independent, but we still explicitly store them all so that they are easily accessible without extra manipulations.

All comparisons between counters are done using the iteration in the common reference frame.

The "global_iteration" counter is stored as a 64 bit integer, as some algorithms might have a very large "step". The "step" is also stored as a 64 bit integer so we can calculate "global_iteration" without having to explicitly convert from 32 to 64 bit.

Definition at line 65 of file iteration_counter.F90.

Public Attributes

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) More...
 

Private Member Functions

procedure set => iteration_counter_set
 set the counter to the value given by another counter More...
 
procedure counter => iteration_counter_counter
 get value of the counter More...
 
procedure global_step => iteration_counter_global_step
 
procedure reset => iteration_counter_reset
 set the counter back to zero More...
 
procedure add => iteration_counter_add
 
procedure subtract => iteration_counter_subtract
 
procedure is_equal => iteration_counter_is_equal
 
procedure is_different => iteration_counter_is_different
 
procedure is_earlier => iteration_counter_is_earlier
 
procedure is_later => iteration_counter_is_later
 
procedure is_equal_or_earlier => iteration_counter_is_equal_or_earlier
 
procedure is_equal_or_later => iteration_counter_is_equal_or_later
 
procedure restart_write => iteration_counter_restart_write
 
procedure restart_read => iteration_counter_restart_read
 
generic operator => add
 
generic operator => subtract
 
generic operator => is_equal
 
generic operator => is_different
 
generic operator => is_earlier
 
generic operator => is_later
 
generic operator => is_equal_or_earlier
 
generic operator => is_equal_or_later
 
pure type(iteration_counter_t) function iteration_counter_constructor (step, initial_iteration)
 

Private Attributes

integer iteration = 0
 the local iteration counter More...
 
integer(int64) step = -1
 how many global iterations correspond to one local iteration More...
 
integer(int64) global_iteration = 0
 the iteration counter in the global referece frame More...
 

Member Function/Subroutine Documentation

◆ set()

procedure iteration_counter_oct_m::iteration_counter_t::set
private

set the counter to the value given by another counter

Definition at line 71 of file iteration_counter.F90.

◆ counter()

procedure iteration_counter_oct_m::iteration_counter_t::counter
private

get value of the counter

Definition at line 72 of file iteration_counter.F90.

◆ global_step()

procedure iteration_counter_oct_m::iteration_counter_t::global_step
private

Definition at line 73 of file iteration_counter.F90.

◆ reset()

procedure iteration_counter_oct_m::iteration_counter_t::reset
private

set the counter back to zero

Definition at line 74 of file iteration_counter.F90.

◆ add()

procedure iteration_counter_oct_m::iteration_counter_t::add
private

Definition at line 75 of file iteration_counter.F90.

◆ subtract()

procedure iteration_counter_oct_m::iteration_counter_t::subtract
private

Definition at line 76 of file iteration_counter.F90.

◆ is_equal()

procedure iteration_counter_oct_m::iteration_counter_t::is_equal
private

Definition at line 77 of file iteration_counter.F90.

◆ is_different()

procedure iteration_counter_oct_m::iteration_counter_t::is_different
private

Definition at line 78 of file iteration_counter.F90.

◆ is_earlier()

procedure iteration_counter_oct_m::iteration_counter_t::is_earlier
private

Definition at line 79 of file iteration_counter.F90.

◆ is_later()

procedure iteration_counter_oct_m::iteration_counter_t::is_later
private

Definition at line 80 of file iteration_counter.F90.

◆ is_equal_or_earlier()

procedure iteration_counter_oct_m::iteration_counter_t::is_equal_or_earlier
private

Definition at line 81 of file iteration_counter.F90.

◆ is_equal_or_later()

procedure iteration_counter_oct_m::iteration_counter_t::is_equal_or_later
private

Definition at line 82 of file iteration_counter.F90.

◆ restart_write()

procedure iteration_counter_oct_m::iteration_counter_t::restart_write
private

Definition at line 83 of file iteration_counter.F90.

◆ restart_read()

procedure iteration_counter_oct_m::iteration_counter_t::restart_read
private

Definition at line 84 of file iteration_counter.F90.

◆ operator() [1/8]

generic iteration_counter_oct_m::iteration_counter_t::operator
private

Definition at line 86 of file iteration_counter.F90.

◆ operator() [2/8]

generic iteration_counter_oct_m::iteration_counter_t::operator
private

Definition at line 87 of file iteration_counter.F90.

◆ operator() [3/8]

generic iteration_counter_oct_m::iteration_counter_t::operator
private

Definition at line 88 of file iteration_counter.F90.

◆ operator() [4/8]

generic iteration_counter_oct_m::iteration_counter_t::operator
private

Definition at line 89 of file iteration_counter.F90.

◆ operator() [5/8]

generic iteration_counter_oct_m::iteration_counter_t::operator
private

Definition at line 90 of file iteration_counter.F90.

◆ operator() [6/8]

generic iteration_counter_oct_m::iteration_counter_t::operator
private

Definition at line 91 of file iteration_counter.F90.

◆ operator() [7/8]

generic iteration_counter_oct_m::iteration_counter_t::operator
private

Definition at line 92 of file iteration_counter.F90.

◆ operator() [8/8]

generic iteration_counter_oct_m::iteration_counter_t::operator
private

Definition at line 93 of file iteration_counter.F90.

◆ iteration_counter_constructor()

pure type(iteration_counter_t) function iteration_counter_oct_m::iteration_counter_t::iteration_counter_constructor ( integer(int64), intent(in), optional  step,
integer, intent(in), optional  initial_iteration 
)
private

Definition at line 110 of file iteration_counter.F90.

Member Data Documentation

◆ iteration

integer iteration_counter_oct_m::iteration_counter_t::iteration = 0
private

the local iteration counter

Definition at line 66 of file iteration_counter.F90.

◆ step

integer(int64) iteration_counter_oct_m::iteration_counter_t::step = -1
private

how many global iterations correspond to one local iteration

Definition at line 67 of file iteration_counter.F90.

◆ global_iteration

integer(int64) iteration_counter_oct_m::iteration_counter_t::global_iteration = 0
private

the iteration counter in the global referece frame

Definition at line 68 of file iteration_counter.F90.

◆ value

procedure(get_value), pointer, public iteration_counter_oct_m::iteration_counter_t::value => null()

function returning some meaninful "value" for the counter in the global reference frame (e.g., the time of a clock)

Definition at line 69 of file iteration_counter.F90.


The documentation for this interface was generated from the following file: