Dune Core Modules (2.8.0)

Classes

class  Dune::Mapper< G, MapperImp, IndexType >
 Mapper interface. More...
 
class  Dune::MultipleCodimMultipleGeomTypeMapper< GV >
 Implementation class for a multiple codim and multiple geometry type mapper. More...
 
class  Dune::LeafMultipleCodimMultipleGeomTypeMapper< G >
 Multiple codim and multiple geometry type mapper for leaf entities. More...
 
class  Dune::LevelMultipleCodimMultipleGeomTypeMapper< G >
 Multiple codim and multiple geometry type mapper for entities of one level. More...
 
class  Dune::SingleCodimSingleGeomTypeMapper< GV, c >
 Implementation class for a single codim and single geometry type mapper. More...
 
class  Dune::LeafSingleCodimSingleGeomTypeMapper< G, c >
 Single codim and single geometry type mapper for leaf entities. More...
 
class  Dune::LevelSingleCodimSingleGeomTypeMapper< G, c >
 Single codim and single geometry type mapper for entities of one level. More...
 

Typedefs

using Dune::MCMGLayout = std::function< size_t(GeometryType, int)>
 layout function for MultipleCodimMultipleGeomTypeMapper More...
 

Functions

template<int codim>
MCMGLayout Dune::mcmgLayout (Codim< codim >)
 layout for entities of codimension codim More...
 
template<int dim>
MCMGLayout Dune::mcmgLayout (Dim< dim >)
 layout for entities of dimension dim More...
 
MCMGLayout Dune::mcmgElementLayout ()
 layout for elements (codim-0 entities) More...
 
MCMGLayout Dune::mcmgVertexLayout ()
 layout for vertices (dim-0 entities) More...
 

Detailed Description

What is a Mapper ?

A mapper class is used to attach user-defined data to a subset of the grid entities \(E^\prime\subseteq E\).

It is assumed that the data \(D(E^\prime)\) associated with \(E^\prime\) is stored in an array. The array can be viewed as a map

\[ a : I_{E^\prime} \to D(E^\prime) \]

from the consecutive, zero-starting index set \( I_{E^\prime} = \{0, \ldots, |E^\prime|-1\}\) of \(E^\prime\) to the data set.

The mapper class provides a mapping

\[ m : E^\prime \to I_{E^\prime} \]

from the entity set to the index set.

Access from a grid entity \(e\in E^\prime\) to its associated data element \(d_e\) then is a two step process:

\[ a(m(e)) = d_e. \]

Different Kinds of Mappers

There are different kinds of mappers depending on functionality and efficiency of their implementation. The user selects an appropriate mapper depending on her/his needs. All mappers conform to the same interface.

Index based Mappers

An index-based mapper is allocated for a grid and can be used as long as the grid is not changed (i.e. refined, coarsened or load balanced). The implementation of static mappers is based on a Dune::IndexSet and is typically of \(O(1)\) complexity with a very small constant. Index-based mappers are only available for restricted (but usually sufficient) entity sets.

Id based Mappers

An id-based mapper can also be used while a grid changes. For that it has to be implemented on the basis of a Dune::IdSet. This may be relatively slow because the data type used for ids is usually not an int and the non-consecutive ids require more complicated search data structures (typically a map). Access is therefore at least \(O(\log |E^\prime|)\). On the other hand, id-based mappers can treat arbitrary entity sets \(E^\prime\).

Mapper Interface

This interface is implemented by the class template Dune::Mapper. For a full documentation see the description of this class.

The function Dune::Mapper::index delivers the index for an entity. Note that that for performance reasons it is usually not checked whether the entity is really in the entity set.

The functions Dune::Mapper::index delivers the index for a (sub-)entity

The function Dune::Mapper::size returns the size of the entity set, i.e. \(|E^\prime|\)

The different implementations of the mapper interface are listed below.

Overview of Different Mapper Implementations

Mappers and Mesh Changes

Typedef Documentation

◆ MCMGLayout

using Dune::MCMGLayout = typedef std::function<size_t(GeometryType, int)>

layout function for MultipleCodimMultipleGeomTypeMapper

The layout function indicates which entity types are contained in the mapper. It is called for each GeometryType and the grid dimension. A true value indicates the geometry type is part of the map; false that it is not.

For commonly used layouts containing only entities of a fixed dimension or codimension, convenience functions returning a MCMGLayout are provided.

The following example is equivalent to mcmgElementLayout():

MCMGLayout layout = [](GeometryType gt, int griddim) {
return gt.dim() == griddim;
};
Unique label for each type of entities that can occur in DUNE grids.
Definition: type.hh:123
bool gt(const T &first, const T &second, typename EpsilonType< T >::Type epsilon)
test if first greater than second
Definition: float_cmp.cc:156
std::function< size_t(GeometryType, int)> MCMGLayout
layout function for MultipleCodimMultipleGeomTypeMapper
Definition: mcmgmapper.hh:62
See also
MultipleCodimMultipleGeomTypeMapper
mcmgLayout(Codim<codim>)
mcmgLayout(Dim<dim>)
mcmgElementLayout()
mcmgVertexLayout()

Function Documentation

◆ mcmgElementLayout()

MCMGLayout Dune::mcmgElementLayout ( )
inline

layout for elements (codim-0 entities)

See also
MultipleCodimMultipleGeomTypeMapper

References Dune::mcmgLayout().

Referenced by checkGrid().

◆ mcmgLayout() [1/2]

template<int codim>
MCMGLayout Dune::mcmgLayout ( Codim< codim >  )

layout for entities of codimension codim

See also
MultipleCodimMultipleGeomTypeMapper

References Dune::FloatCmp::gt().

Referenced by Dune::mcmgElementLayout(), and Dune::mcmgVertexLayout().

◆ mcmgLayout() [2/2]

template<int dim>
MCMGLayout Dune::mcmgLayout ( Dim< dim >  )

layout for entities of dimension dim

See also
MultipleCodimMultipleGeomTypeMapper

References Dune::FloatCmp::gt().

◆ mcmgVertexLayout()

MCMGLayout Dune::mcmgVertexLayout ( )
inline

layout for vertices (dim-0 entities)

See also
MultipleCodimMultipleGeomTypeMapper

References Dune::mcmgLayout().

Referenced by checkGrid().

Creative Commons License   |  Legal Statements / Impressum  |  Hosted by TU Dresden  |  generated with Hugo v0.111.3 (Nov 21, 23:30, 2024)