/root/tmp/opm-verteq-release-2015.10-final/opm/verteq/utility/runlen.hpp

Regards a set of (member) variables as a run-length encoded matrix.

Each column can have a variable number of rows. Although the values of the matrix can be changed, its sparsity cannot, i.e. one cannot remove or add new elements to a column.

Use this class to access and iterate over a run-length encoded matrix in the format that is used by UnstructuredGrid without having to worry about getting the indexing right.

Template Parameters
TDatatype for the extra data that should be stored for each element, e.g. double.
RunLenView <int> faces_in_cell (
g.number_of_cells,
g.cell_facepos,
g.cell_faces
);
int num_local_faces = faces_in_cell.size (cellno);
int first_local_face = faces_in_cell [cellno] [0];

Notice if you want to loop through every item and know where you are (because you intend to use this as an index in another matrix), you can do: