DUNE MultiDomainGrid (2.8)
Implementation class for a multiple codim and multiple geometry type mapper. More...
#include <dune/grid/multidomaingrid/multidomainmcmgmapper.hh>
Public Member Functions | |
MultiDomainMCMGMapper (const GV &gv) | |
Construct mapper from grid and one of its index sets. More... | |
template<class EntityType > | |
int | map (SubDomainIndex subDomain, const EntityType &e) const |
Map entity to array index. More... | |
int | map (SubDomainIndex subDomain, const typename GV::template Codim< 0 >::Entity &e, int i, unsigned int codim) const |
Map subentity of codim 0 entity to array index. More... | |
int | size (SubDomainIndex subDomain) const |
Return total number of entities in the entity set managed by the mapper. More... | |
template<class EntityType > | |
bool | contains (SubDomainIndex subDomain, const EntityType &e, IndexType &result) const |
Returns true if the entity is contained in the index set. More... | |
template<int cc> | |
bool | contains (SubDomainIndex subDomain, const typename GV::template Codim< 0 >::Entity &e, int i, IndexType &result) const |
Returns true if the entity is contained in the index set. More... | |
void | update () |
Recalculates indices after grid adaptation. | |
void | update (const GV &gv) |
Recalculates indices after grid adaptation. More... | |
Detailed Description
class Dune::mdgrid::MultiDomainMCMGMapper< GV >
Implementation class for a multiple codim and multiple geometry type mapper.
In this implementation of a mapper the entity set used as domain for the map consists of the entities of a subset of codimensions in the given index set. The index set may contain entities of several geometry types. This version is usually not used directly but is used to implement versions for leafwise and levelwise entity sets.
Template parameters are:
- GV
- A Dune GridView type.
- Layout
- A helper class with a method contains(), that returns true for all geometry types that are in the domain of the map. The class should be of the following shape template<int dim>struct LayoutClass {// Return true if gt is in the domain of the map}};bool contains(SubDomainIndex subDomain, const EntityType &e, IndexType &result) constReturns true if the entity is contained in the index set.Definition: multidomainmcmgmapper.hh:168
If you don't want to use the default constructor of the LayoutClass you can construct it yourself and hand it to the respective constructor.
Constructor & Destructor Documentation
◆ MultiDomainMCMGMapper()
|
inline |
Construct mapper from grid and one of its index sets.
- Parameters
-
grid A Dune grid object. indexset IndexSet object returned by grid.
References Dune::mdgrid::MultiDomainMCMGMapper< GV >::update().
Member Function Documentation
◆ contains() [1/2]
|
inline |
Returns true if the entity is contained in the index set.
- Parameters
-
e Reference to entity result integer reference where corresponding index is stored if true
- Returns
- true if entity is in entity set of the mapper
References Dune::mdgrid::MultiDomainMCMGMapper< GV >::contains(), and Dune::mdgrid::MultiDomainMCMGMapper< GV >::map().
Referenced by Dune::mdgrid::MultiDomainMCMGMapper< GV >::contains().
◆ contains() [2/2]
|
inline |
Returns true if the entity is contained in the index set.
- Parameters
-
e Reference to codim 0 entity i subentity number result integer reference where corresponding index is stored if true
- Returns
- true if entity is in entity set of the mapper
References Dune::mdgrid::MultiDomainMCMGMapper< GV >::contains().
◆ map() [1/2]
|
inline |
Map entity to array index.
- Parameters
-
e Reference to codim cc entity, where cc is the template parameter of the function.
- Returns
- An index in the range 0 ... Max number of entities in set - 1.
Referenced by Dune::mdgrid::MultiDomainMCMGMapper< GV >::contains().
◆ map() [2/2]
|
inline |
Map subentity of codim 0 entity to array index.
- Parameters
-
e Reference to codim 0 entity. i Number of subentity of e codim Codimension of the subendity
- Returns
- An index in the range 0 ... Max number of entities in set - 1.
◆ size()
|
inline |
Return total number of entities in the entity set managed by the mapper.
This number can be used to allocate a vector of data elements associated with the entities of the set. In the parallel case this number is per process (i.e. it may be different in different processes).
- Returns
- Size of the entity set.
◆ update()
|
inline |
Recalculates indices after grid adaptation.
After grid adaptation you need to call this to update the stored gridview and recalculate the indices.
References Dune::mdgrid::MultiDomainMCMGMapper< GV >::update().
The documentation for this class was generated from the following file:
- dune/grid/multidomaingrid/multidomainmcmgmapper.hh
