Loading [MathJax]/extensions/tex2jax.js

DUNE MultiDomainGrid (unstable)

Dune::mdgrid::MultiDomainMCMGMapper< GV > Class Template Reference

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 (const GV &gv)
 Recalculates indices after grid adaptation. More...
 

Detailed Description

template<typename GV>
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 {
bool contains (Dune::GeometryType gt) const {
// Return true if gt is in the domain of the map
}
};
bool contains(SubDomainIndex subDomain, const EntityType &e, IndexType &result) const
Returns 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()

template<typename GV >
Dune::mdgrid::MultiDomainMCMGMapper< GV >::MultiDomainMCMGMapper ( const GV &  gv)
inline

Construct mapper from grid and one of its index sets.

Parameters
gridA Dune grid object.
indexsetIndexSet object returned by grid.

References Dune::mdgrid::MultiDomainMCMGMapper< GV >::update().

Member Function Documentation

◆ contains() [1/2]

template<typename GV >
template<class EntityType >
bool Dune::mdgrid::MultiDomainMCMGMapper< GV >::contains ( SubDomainIndex  subDomain,
const EntityType &  e,
IndexType &  result 
) const
inline

Returns true if the entity is contained in the index set.

Parameters
eReference to entity
resultinteger 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]

template<typename GV >
template<int cc>
bool Dune::mdgrid::MultiDomainMCMGMapper< GV >::contains ( SubDomainIndex  subDomain,
const typename GV::template Codim< 0 >::Entity &  e,
int  i,
IndexType &  result 
) const
inline

Returns true if the entity is contained in the index set.

Parameters
eReference to codim 0 entity
isubentity number
resultinteger 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]

template<typename GV >
template<class EntityType >
int Dune::mdgrid::MultiDomainMCMGMapper< GV >::map ( SubDomainIndex  subDomain,
const EntityType &  e 
) const
inline

Map entity to array index.

Parameters
eReference 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]

template<typename GV >
int Dune::mdgrid::MultiDomainMCMGMapper< GV >::map ( SubDomainIndex  subDomain,
const typename GV::template Codim< 0 >::Entity &  e,
int  i,
unsigned int  codim 
) const
inline

Map subentity of codim 0 entity to array index.

Parameters
eReference to codim 0 entity.
iNumber of subentity of e
codimCodimension of the subendity
Returns
An index in the range 0 ... Max number of entities in set - 1.

◆ size()

template<typename GV >
int Dune::mdgrid::MultiDomainMCMGMapper< GV >::size ( SubDomainIndex  subDomain) const
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()

template<typename GV >
void Dune::mdgrid::MultiDomainMCMGMapper< GV >::update ( const GV &  gv)
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().

Referenced by Dune::mdgrid::MultiDomainMCMGMapper< GV >::MultiDomainMCMGMapper(), and Dune::mdgrid::MultiDomainMCMGMapper< GV >::update().


The documentation for this class was generated from the following file:
Creative Commons License   |  Legal Statements / Impressum  |  Hosted by TU Dresden & Uni Heidelberg  |  generated with Hugo v0.111.3 (Apr 7, 22:57, 2025)