1#ifndef DUNE_FEM_GRIDPART_IDGRIDPART_INDEXSET_HH
2#define DUNE_FEM_GRIDPART_IDGRIDPART_INDEXSET_HH
7#include <dune/geometry/type.hh>
23 template<
class Gr
idFamily >
28 namespace __IdIndexSet
34 template<
class Gr
idFamily >
38 typedef typename std::remove_const< GridFamily >::type::Traits
Traits;
43 static const int dimension = HostIndexSetType::dimension;
51 typedef typename HostIndexSetType::IndexType
IndexType;
53 typedef typename HostIndexSetType::Types
Types;
64 const std::vector< GeometryType > &
geomTypes (
int codim )
const
69 template<
class Entity >
72 return hostIndexSet().contains( entity.impl().hostEntity() );
85 template<
class Entity >
88 return index< Entity::codimension >( entity );
94 return hostIndexSet().template index< codim >( entity.impl().hostEntity() );
97 template<
class Entity >
100 return subIndex< Entity::codimension >( entity, i, cd );
103 template<
int codim >
106 return hostIndexSet().template subIndex< codim >( entity.impl().hostEntity(), i, cd );
111 return hostIndexSet_;
131 template<
class Gr
idFamily >
152 hostIndexSet().insertEntity( entity.impl().hostEntity() );
157 hostIndexSet().removeEntity( entity.impl().hostEntity() );
188 template<
class Gr
idFamily >
235 template<
class GridFamily,
236 class HostIndexSet =
typename std::remove_const< GridFamily >::type::Traits::HostGridPartType::IndexSetType,
241 typedef typename std::conditional< adaptive,
243 typename std::conditional< consecutive,
257 template<
class Gr
idFamily >
266 explicit IdIndexSet (
const typename BaseType::HostIndexSetType &hostIndexSet )
267 : BaseType ( hostIndexSet )
273 namespace Capabilities
276 template<
class Gr
idFamily >
281 template<
class Gr
idFamily >
286 template<
class Gr
idFamily >
291 typedef typename IndexSetType::HostIndexSetType HostIndexSetType;
Definition: bindguard.hh:11
specialize with true if index set implements the interface for consecutive index sets
Definition: common/indexset.hh:42
specialize with true if index set implements the interface for adaptive index sets
Definition: common/indexset.hh:64
virtual base class for persistent index sets
Definition: persistentindexset.hh:35
capability for persistent index sets
Definition: persistentindexset.hh:92
static constexpr PersistentIndexSetInterface * map(IndexSet &indexSet) noexcept
please doc me
Definition: persistentindexset.hh:101
static const bool v
please doc me
Definition: persistentindexset.hh:98
Definition: idgridpart/indexset.hh:260
IdIndexSet(const typename BaseType::HostIndexSetType &hostIndexSet)
Definition: idgridpart/indexset.hh:266
Definition: idgridpart/indexset.hh:36
IndexSet(const HostIndexSetType &hostIndexSet)
Definition: idgridpart/indexset.hh:55
IndexType size(GeometryType type) const
Definition: idgridpart/indexset.hh:75
Traits::HostGridPartType::IndexSetType HostIndexSetType
Definition: idgridpart/indexset.hh:41
IndexType subIndex(const Entity &entity, int i, unsigned int cd) const
Definition: idgridpart/indexset.hh:98
static const int dimension
Definition: idgridpart/indexset.hh:43
HostIndexSetType & hostIndexSet()
Definition: idgridpart/indexset.hh:120
IndexType index(const Entity &entity) const
Definition: idgridpart/indexset.hh:86
std::remove_const< GridFamily >::type::Traits Traits
Definition: idgridpart/indexset.hh:38
HostIndexSetType::Types Types
Definition: idgridpart/indexset.hh:53
IndexType size(int codim) const
Definition: idgridpart/indexset.hh:80
void requestCodimensions(const std::vector< int > &codimensions) const
Definition: idgridpart/indexset.hh:114
Types types(int codim) const
Definition: idgridpart/indexset.hh:59
bool contains(const Entity &entity) const
Definition: idgridpart/indexset.hh:70
const std::vector< GeometryType > & geomTypes(int codim) const
Definition: idgridpart/indexset.hh:64
IndexType index(const typename Codim< codim >::Entity &entity) const
Definition: idgridpart/indexset.hh:92
HostIndexSetType::IndexType IndexType
Definition: idgridpart/indexset.hh:51
IndexType subIndex(const typename Codim< codim >::Entity &entity, int i, unsigned int cd) const
Definition: idgridpart/indexset.hh:104
const HostIndexSetType & hostIndexSet() const
Definition: idgridpart/indexset.hh:109
Definition: idgridpart/indexset.hh:47
Traits::template Codim< codim >::Entity Entity
Definition: idgridpart/indexset.hh:48
Definition: idgridpart/indexset.hh:134
ConsecutiveIndexSet(const HostIndexSetType &hostIndexSet)
Definition: idgridpart/indexset.hh:142
void removeEntity(const typename BaseType::template Codim< 0 >::Entity &entity)
Definition: idgridpart/indexset.hh:155
BaseType::HostIndexSetType HostIndexSetType
Definition: idgridpart/indexset.hh:138
void backup() const
Definition: idgridpart/indexset.hh:160
HostIndexSetType & hostIndexSet()
Definition: idgridpart/indexset.hh:177
void read(InStreamInterface< T > &stream)
Definition: idgridpart/indexset.hh:171
void insertEntity(const typename BaseType::template Codim< 0 >::Entity &entity)
Definition: idgridpart/indexset.hh:150
void restore()
Definition: idgridpart/indexset.hh:162
bool compress()
Definition: idgridpart/indexset.hh:148
void write(OutStreamInterface< T > &stream)
Definition: idgridpart/indexset.hh:165
void resize()
Definition: idgridpart/indexset.hh:146
Definition: idgridpart/indexset.hh:191
AdaptiveIndexSet(const typename BaseType::HostIndexSetType &hostIndexSet)
Definition: idgridpart/indexset.hh:195
int oldIndex(int hole, GeometryType type) const
Definition: idgridpart/indexset.hh:209
int newIndex(int hole, int codim) const
Definition: idgridpart/indexset.hh:224
int numberOfHoles(int codim) const
Definition: idgridpart/indexset.hh:204
int newIndex(int hole, GeometryType type) const
Definition: idgridpart/indexset.hh:219
int numberOfHoles(GeometryType type) const
Definition: idgridpart/indexset.hh:199
int oldIndex(int hole, int codim) const
Definition: idgridpart/indexset.hh:214
Definition: idgridpart/indexset.hh:240
std::conditional< adaptive, AdaptiveIndexSet< GridFamily >, typenamestd::conditional< consecutive, ConsecutiveIndexSet< GridFamily >, IndexSet< GridFamily > >::type >::type Type
Definition: idgridpart/indexset.hh:247
static constexpr PersistentIndexSetInterface * map(IndexSetType &indexSet) noexcept
Definition: idgridpart/indexset.hh:296
abstract interface for an output stream
Definition: streams.hh:46
abstract interface for an input stream
Definition: streams.hh:179