DUNE PDELab (2.8)
Class providing a consecutive index for codim 0 entities of a GridView. More...
#include <dune/pdelab/common/elementmapper.hh>
Public Types | |
typedef BaseT::size_type | size_type |
The type of the returned index. | |
typedef BaseT::Element | Element |
The type of the codim 0 entities of the GridView. | |
Public Member Functions | |
ElementMapper (const GV &gv) | |
Construct a CellIndexProvider for the given GridView. More... | |
size_type | map (const Element &e) const |
Return the index of the given element. More... | |
Detailed Description
class Dune::PDELab::ElementMapper< GV >
Class providing a consecutive index for codim 0 entities of a GridView.
ElementMapper yields a unique, consecutive, zero-based index for all codim 0 entities of a GridView. Conceptually, this can also be achieved using a Mapper from dune-grid, but this implementation has better performance as it avoids looking up the GeometryType in a std::map. For the common case of grids with a single codim 0 GeometryType, ElementMapper is specialized to just look up the cell index on the IndexSet of the GridView.
- Template Parameters
-
GV The type of the GridView to operate on.
Constructor & Destructor Documentation
◆ ElementMapper()
|
inline |
Member Function Documentation
◆ map()
|
inline |
Return the index of the given element.
Returns an index for the given codim 0 entity that is guaranteed to be zero-based, consecutive and unique across all codim 0 entities of the GridView.
- Parameters
-
e The codim 0 entity for which to calculate an index.
- Returns
- The index of the entity.
The documentation for this class was generated from the following file:
- dune/pdelab/common/elementmapper.hh