5 #ifndef DUNE_SCSGMAPPER_HH
6 #define DUNE_SCSGMAPPER_HH
39 template <
typename GV,
int c>
41 public Mapper<typename GV::Grid,SingleCodimSingleGeomTypeMapper<GV,c> >
61 template<
class EntityType>
62 int map (
const EntityType& e)
const;
71 int map (
const typename GV::template Codim<0>::Entity& e,
72 int i,
unsigned int codim)
const;
90 template<
class EntityType>
91 bool contains (
const EntityType& e,
int& result)
const;
101 bool contains (
const typename GV::template Codim<0>::Entity& e,
int i,
int cc,
int& result)
const;
110 const typename GV::IndexSet& is;
115 template <
typename GV,
int c>
117 : is(gridView.indexSet())
120 if (is.geomTypes(c).size() != 1)
121 DUNE_THROW(
GridError,
"mapper treats only a single codim and a single geometry type");
124 template <
typename GV,
int c>
125 template<
class EntityType>
128 enum { cc = EntityType::codimension };
129 dune_static_assert(cc == c,
"Entity of wrong codim passed to SingleCodimSingleGeomTypeMapper");
133 template <
typename GV,
int c>
137 DUNE_THROW(
GridError,
"Id of wrong codim requested from SingleCodimSingleGeomTypeMapper");
138 return is.subIndex(e,i,codim);
141 template <
typename GV,
int c>
147 template <
typename GV,
int c>
148 template<
class EntityType>
155 template <
typename GV,
int c>
158 result = this->map(e,i,cc);
180 template <
typename G,
int c>
204 template <
typename G,
int c>
Implementation class for a single codim and single geometry type mapper.
Definition: scsgmapper.hh:40
LeafSingleCodimSingleGeomTypeMapper(const G &grid)
Definition: scsgmapper.hh:186
SingleCodimSingleGeomTypeMapper(const GV &gridView)
Construct mapper from grid and one of its index sets.
Definition: scsgmapper.hh:116
Single codim and single geometry type mapper for leaf entities.
Definition: scsgmapper.hh:181
int map(const EntityType &e) const
Map entity to array index.
Definition: scsgmapper.hh:126
Single codim and single geometry type mapper for entities of one level.
Definition: scsgmapper.hh:205
Provides classes with basic mappers which are used to attach data to a grid.
Mapper interface.
Definition: mapper.hh:110
void update()
Recalculates map after mesh adaptation.
Definition: scsgmapper.hh:105
Base class for exceptions in Dune grid modules.
Definition: exceptions.hh:16
bool contains(const EntityType &e, int &result) const
Returns true if the entity is contained in the index set.
Definition: scsgmapper.hh:149
Different resources needed by all grid implementations.
LevelSingleCodimSingleGeomTypeMapper(const G &grid, int level)
Definition: scsgmapper.hh:211
int size() const
Return total number of entities in the entity set managed by the mapper.
Definition: scsgmapper.hh:142