1 #ifndef DUNE_FEM_GRIDPART_COMMON_INDEXSETWRAPPER_HH 2 #define DUNE_FEM_GRIDPART_COMMON_INDEXSETWRAPPER_HH 19 template<
class IndexSet >
27 template<
class IndexSet >
36 :
public IndexSet::template
Codim< codim >
52 template<
class IndexSet >
63 : indexSet_( indexSet )
69 return indexSet().types( codim );
73 const std::vector< GeometryType > &
geomTypes (
int codim )
const 75 return indexSet().geomTypes( codim );
79 template<
class Entity >
82 return indexSet().contains( entity );
86 IndexType
size ( GeometryType type )
const 88 return indexSet().size( type );
92 IndexType
size (
int codim )
const 94 return indexSet().size( codim );
98 template<
class Entity >
99 IndexType
index (
const Entity &entity )
const 101 return index< Entity::codimension >( entity );
105 template<
int codim >
106 IndexType
index (
const typename BaseType::template Codim< codim >::Entity &entity )
const 108 return indexSet().template index< codim >( entity );
112 template<
class Entity >
113 IndexType
subIndex (
const Entity &entity,
int i,
unsigned int cd )
const 115 return subIndex< Entity::codimension >( entity, i, cd );
119 template<
int codim >
120 IndexType
subIndex (
const typename BaseType::template Codim< codim >::Entity &entity,
int i,
unsigned int cd )
const 122 return indexSet().template subIndex< codim >( entity, i, cd );
136 static constexpr
bool compress () noexcept {
return false; }
139 static void insertEntity (
const typename BaseType::template Codim< 0 >::Entity & )
143 static void removeEntity (
const typename BaseType::template Codim< 0 >::Entity & )
181 const IndexSet &indexSet ()
const {
return indexSet_; }
188 namespace Capabilities
191 template<
class IndexSet >
194 static const bool v =
false;
197 template<
class IndexSet >
200 static const bool v =
false;
209 #endif // #ifndef DUNE_FEM_GRIDPART_COMMON_INDEXSETWRAPPER_HH BaseType::IndexType IndexType
index type
Definition: nonadaptiveindexset.hh:60
IndexType size(int codim) const
Definition: nonadaptiveindexset.hh:92
NonAdaptiveIndexSet< IndexSet > IndexSetType
Definition: nonadaptiveindexset.hh:30
interface documentation for (grid part) index sets
Definition: common/indexset.hh:25
bool contains(const Entity &entity) const
return true if entity has index
Definition: nonadaptiveindexset.hh:80
IndexSet::IndexType IndexType
Definition: nonadaptiveindexset.hh:39
const std::vector< GeometryType > & geomTypes(int codim) const
return vector of geometry types used of given codimension
Definition: nonadaptiveindexset.hh:73
static constexpr bool consecutive() noexcept
please doc me
Definition: nonadaptiveindexset.hh:126
IndexSet::Types Types
Definition: nonadaptiveindexset.hh:41
void backup() const
please doc me
Definition: nonadaptiveindexset.hh:147
void write(OutStreamInterface< T > &stream) const
please doc me
Definition: nonadaptiveindexset.hh:154
specialize with true if index set implements the interface for consecutive index sets ...
Definition: common/indexset.hh:46
void read(InStreamInterface< T > &stream)
please doc me
Definition: nonadaptiveindexset.hh:159
static constexpr int newIndex(...) noexcept
return new index for given hole and type
Definition: nonadaptiveindexset.hh:175
extended interface for adaptive, consecutive index sets
Definition: common/indexset.hh:29
static void insertEntity(const typename BaseType::template Codim< 0 >::Entity &)
please doc me
Definition: nonadaptiveindexset.hh:139
Definition: coordinate.hh:4
specialize with true if index set implements the interface for adaptive index sets ...
Definition: common/indexset.hh:69
abstract interface for an input stream
Definition: streams.hh:177
IndexType index(const typename BaseType::template Codim< codim >::Entity &entity) const
return index for given entity
Definition: nonadaptiveindexset.hh:106
static const int dimension
Definition: nonadaptiveindexset.hh:32
void restore()
please doc me
Definition: nonadaptiveindexset.hh:150
BaseType::Types types(int codim) const
return range of geometry types
Definition: nonadaptiveindexset.hh:67
IndexType index(const Entity &entity) const
return index for given entity
Definition: nonadaptiveindexset.hh:99
Definition: nonadaptiveindexset.hh:35
NonAdaptiveIndexSet(const IndexSet &indexSet)
Definition: nonadaptiveindexset.hh:62
static constexpr int oldIndex(...) noexcept
return old index for given hole and type
Definition: nonadaptiveindexset.hh:169
IndexType subIndex(const Entity &entity, int i, unsigned int cd) const
return index for given subentity
Definition: nonadaptiveindexset.hh:113
wrapper for (adaptive) index sets that disables all support for adaptivity
Definition: nonadaptiveindexset.hh:20
Traits::IndexType IndexType
index type
Definition: common/indexset.hh:123
static void removeEntity(const typename BaseType::template Codim< 0 >::Entity &)
please doc me
Definition: nonadaptiveindexset.hh:143
IndexType size(GeometryType type) const
return number of entities of given type
Definition: nonadaptiveindexset.hh:86
Traits::Types Types
geometry type range type
Definition: common/indexset.hh:126
IndexType subIndex(const typename BaseType::template Codim< codim >::Entity &entity, int i, unsigned int cd) const
return index for given subentity
Definition: nonadaptiveindexset.hh:120
static constexpr bool compress() noexcept
please doc me
Definition: nonadaptiveindexset.hh:136
static constexpr int numberOfHoles(...) noexcept
return number of holes for given type
Definition: nonadaptiveindexset.hh:163
abstract interface for an output stream
Definition: streams.hh:44
static const int dimension
grid dimension
Definition: common/indexset.hh:113
static void resize()
please doc me
Definition: nonadaptiveindexset.hh:133
Definition: nonadaptiveindexset.hh:28