21 #ifndef bempp_concrete_element_mapper_hpp
22 #define bempp_concrete_element_mapper_hpp
24 #include "../common/common.hpp"
28 #include <dune/grid/common/mcmgmapper.hh>
36 template <
typename DuneGr
idView>
40 Dune::MultipleCodimMultipleGeomTypeMapper<DuneGridView,
41 Dune::MCMGElementLayout > m_dune_mapper;
45 m_dune_mapper(dune_gv,
46 Dune::MCMGElementLayout<DuneGridView::dimension>())
49 virtual size_t size()
const {
50 return m_dune_mapper.size();
54 typedef typename DuneGridView::template Codim<0>::Entity DuneEntity;
56 const ConcEntity& ce =
dynamic_cast<const ConcEntity&
>(e);
57 return m_dune_mapper.map(ce.duneEntity());
61 throw std::logic_error(
"ConcreteElementMapper::entityIndex(): "
62 "entities of codimension 1 do not belong to the "
67 throw std::logic_error(
"ConcreteElementMapper::entityIndex(): "
68 "entities of codimension 2 do not belong to the "
73 throw std::logic_error(
"ConcreteElementMapper::entityIndex(): "
74 "entities of codimension 2 do not belong to the "
80 typedef typename DuneGridView::template Codim<0>::Entity DuneEntity;
82 const ConcEntity& ce =
dynamic_cast<const ConcEntity&
>(e);
83 return m_dune_mapper.map(ce.duneEntity(), i, codimSub);
Abstract wrapper of an entity of codimension codim.
Definition: entity.hpp:46
virtual size_t entityIndex(const Entity< 1 > &e) const
Index of the entity of codimension 1.
Definition: concrete_element_mapper.hpp:60
Wrapper of a Dune entity of type DuneEntity and codimension 0.
Definition: concrete_entity_decl.hpp:117
virtual size_t entityIndex(const Entity< 2 > &e) const
Index of the entity of codimension 2.
Definition: concrete_element_mapper.hpp:66
An injective mapping from the full set of codimension-0 entities ("elements") of a grid to the intege...
Definition: concrete_element_mapper.hpp:37
virtual size_t size() const
Total number of entities in the entity set managed by the mapper.
Definition: concrete_element_mapper.hpp:49
virtual size_t subEntityIndex(const Entity< 0 > &e, size_t i, int codimSub) const
Index of i'th subentity of codimension codimSub of entity e of codimension 0.
Definition: concrete_element_mapper.hpp:78
virtual size_t entityIndex(const Entity< 0 > &e) const
Index of the entity of codimension 0.
Definition: concrete_element_mapper.hpp:53
virtual size_t entityIndex(const Entity< 3 > &e) const
Index of the entity of codimension 3.
Definition: concrete_element_mapper.hpp:72
Abstract wrapper of an entity of codimension 0.
Definition: entity.hpp:81
Abstract mapper class.
Definition: mapper.hpp:39