19 #ifndef PISM_ELEMENTITERATOR_H
20 #define PISM_ELEMENTITERATOR_H
Describes the PISM grid and the distribution of data across processors.
int xm
total number of elements to loop over in the x-direction.
int lym
total number local elements in y direction.
int lxm
total number local elements in x direction.
int lxs
x-index of the first local element.
ElementIterator(const Grid &g)
int ym
total number of elements to loop over in the y-direction.
int ys
y-coordinate of the first element to loop over.
int element_count()
The total number of elements to be iterated over. Useful for creating per-element storage.
int flatten(int i, int j)
Convert an element index (i,j) into a flattened (1-d) array index, with the first element (i,...
int lys
y-index of the first local element.
int xs
x-coordinate of the first element to loop over.
Manages iterating over element indices.