Represents the topological relationships between sets of entities, for example cells and faces.
More...
#include <OrientedEntityTable.hpp>
|
| OrientedEntityTable () |
| Default constructor.
|
|
template<typename DataIter , typename IntegerIter > |
| OrientedEntityTable (DataIter data_beg, DataIter data_end, IntegerIter rowsize_beg, IntegerIter rowsize_end) |
| Constructor taking iterators to a sequence of table data and a sequence of row size data. More...
|
|
int | rowSize (const FromType &e) const |
| Given an entity e of codimension codim_from, returns the number of neighbours of codimension codim_to. More...
|
|
row_type | operator[] (const FromType &e) const |
| Given an entity e of codimension codim_from, returns a row (an indirect container) containing its neighbour entities of codimension codim_to. More...
|
|
mutable_row_type | row (const FromType &e) |
| Given an entity e of codimension codim_from, returns a row (an indirect container) containing its neighbour entities of codimension codim_to. More...
|
|
bool | operator== (const OrientedEntityTable &other) const |
| Elementwise equality. More...
|
|
void | printSparseRelationMatrix (std::ostream &os) const |
| Prints the relation matrix corresponding to the table, sparse format. More...
|
|
void | printRelationMatrix (std::ostream &os) const |
| Prints the full relation matrix corresponding to the table. More...
|
|
void | makeInverseRelation (OrientedEntityTable< codim_to, codim_from > &inv) const |
| Makes the inverse relation, mapping codim_to entities to their codim_from neighbours. More...
|
|
bool | empty () const |
| True if the table contains no rows.
|
|
int | size () const |
| Returns the number of rows in the table.
|
|
int | dataSize () const |
| Returns the number of data elements.
|
|
void | clear () |
| Makes the table empty().
|
|
template<typename DataIter > |
void | appendRow (DataIter row_beg, DataIter row_end) |
| Appends a row to the table.
|
|
template<typename IntegerIter > |
void | allocate (IntegerIter rowsize_beg, IntegerIter rowsize_end) |
| Request storage for table of given size. More...
|
|
template<int codim_from, int codim_to>
class Dune::cpgrid::OrientedEntityTable< codim_from, codim_to >
Represents the topological relationships between sets of entities, for example cells and faces.
The purpose of this class is to hide the intricacies of handling orientations from the client code, otherwise a straight Opm::SparseTable would do.
- Template Parameters
-
codim_from | Codimension of domain of relation mapping |
codim_to | Codimension of range of relation mapping |
◆ OrientedEntityTable()
template<int codim_from, int codim_to>
template<typename DataIter , typename IntegerIter >
Constructor taking iterators to a sequence of table data and a sequence of row size data.
These table data are in the same format as the underlying Opm::SparseTable<int> constructor with the same signature.
- Template Parameters
-
- Parameters
-
data_beg | The start of the table data. |
data_end | One-beyond-end of the table data. |
rowsize_beg | The start of the row length data. |
rowsize_end | One beyond the end of the row length data. |
◆ allocate()
template<int codim_from, int codim_to>
template<typename IntegerIter >
Request storage for table of given size.
- Parameters
-
rowsize_beg | Start of row size data. |
rowsize_end | One beyond end of row size data. |
◆ makeInverseRelation()
template<int codim_from, int codim_to>
Makes the inverse relation, mapping codim_to entities to their codim_from neighbours.
Implementation note: The algorithm has been changed to a three-pass O(n) algorithm.
- Parameters
-
◆ operator==()
template<int codim_from, int codim_to>
Elementwise equality.
- Parameters
-
- Returns
- Returns true if this and the other element are equal.
◆ operator[]()
template<int codim_from, int codim_to>
Given an entity e of codimension codim_from, returns a row (an indirect container) containing its neighbour entities of codimension codim_to.
- Parameters
-
- Returns
- A row of the table.
◆ printRelationMatrix()
template<int codim_from, int codim_to>
Prints the full relation matrix corresponding to the table.
Let the entities of codimensions f and t be given by the sets
and
. A relation matrix R is defined by
Warning: this method is suited only for tiny grids, use printSparseRelationMatrix() for other cases.
- Parameters
-
◆ printSparseRelationMatrix()
template<int codim_from, int codim_to>
Prints the relation matrix corresponding to the table, sparse format.
Let the entities of codimensions f and t be given by the sets
and
. A relation matrix R is defined by
The output is written one entry to each line, in the format:
row column entry (either 1 or -1)
The row and column numbers start from zero, so if using octave or matlab you should add 1 to those columns after loading, before calling spconvert().
- Parameters
-
◆ row()
template<int codim_from, int codim_to>
Given an entity e of codimension codim_from, returns a row (an indirect container) containing its neighbour entities of codimension codim_to.
- Parameters
-
- Returns
- A row of the table.
◆ rowSize()
template<int codim_from, int codim_to>
Given an entity e of codimension codim_from, returns the number of neighbours of codimension codim_to.
- Parameters
-
- Returns
- the number of neighbours of codimension codim_to.
The documentation for this class was generated from the following file: