3 #ifndef DUNE_GEOGRID_INDEXSETS_HH
4 #define DUNE_GEOGRID_INDEXSETS_HH
8 #include <dune/common/typetraits.hh>
24 template<
class Gr
id,
class HostIndexSet >
26 :
public Dune::IndexSet< Grid, IndexSet< Grid, HostIndexSet >, typename HostIndexSet::IndexType, typename HostIndexSet::Types >
31 typedef typename remove_const< Grid >::type::Traits Traits;
33 typedef typename Traits::HostGrid HostGrid;
46 explicit IndexSet (
const HostIndexSet &hostIndexSet )
47 : hostIndexSet_( &hostIndexSet )
51 : hostIndexSet_( other.hostIndexSet_ )
56 hostIndexSet_ = other.hostIndexSet_;
64 IndexType
index (
const typename Traits::template Codim< cc >::Entity &entity )
const
66 return Grid::getRealImplementation( entity ).index( hostIndexSet() );
70 IndexType
subIndex (
const typename Traits::template Codim< cc >::Entity &entity,
int i,
unsigned int codim )
const
72 return Grid::getRealImplementation( entity ).subIndex( hostIndexSet(), i, codim );
77 return hostIndexSet().size( type );
80 int size (
int codim )
const
82 return hostIndexSet().size( codim );
85 template<
class Entity >
88 return Grid::getRealImplementation( entity ).isContained( hostIndexSet() );
91 Types
types (
int codim )
const {
return hostIndexSet().types( codim ); }
93 const std::vector< GeometryType > &
geomTypes (
int codim )
const
95 return hostIndexSet().geomTypes( codim );
98 operator bool ()
const {
return bool( hostIndexSet_ ); }
101 const HostIndexSet &hostIndexSet ()
const
104 return *hostIndexSet_;
107 const HostIndexSet *hostIndexSet_;
114 #endif // #ifndef DUNE_GEOGRID_INDEXSETS_HH
IndexSet()
Definition: geometrygrid/indexsets.hh:42
Definition: geometrygrid/indexsets.hh:25
IndexType size(GeometryType type) const
Definition: geometrygrid/indexsets.hh:75
IndexType index(const typename Traits::template Codim< cc >::Entity &entity) const
Definition: geometrygrid/indexsets.hh:64
IndexType index(const typename Traits::template Codim< cc >::Entity &e) const
Map entity to index. The result of calling this method with an entity that is not in the index set is...
Definition: indexidset.hh:115
IndexType subIndex(const typename Traits::template Codim< cc >::Entity &entity, int i, unsigned int codim) const
Definition: geometrygrid/indexsets.hh:70
GeometryType
Type representing VTK's entity geometry types.
Definition: common.hh:178
Include standard header files.
Definition: agrid.hh:59
int size(int codim) const
Definition: geometrygrid/indexsets.hh:80
bool contains(const Entity &entity) const
Definition: geometrygrid/indexsets.hh:86
TypesImp Types
iterator range for geometry types in domain
Definition: indexidset.hh:93
const std::vector< GeometryType > & geomTypes(int codim) const
Definition: geometrygrid/indexsets.hh:93
Base::Types Types
Definition: geometrygrid/indexsets.hh:40
IndexSet(const This &other)
Definition: geometrygrid/indexsets.hh:50
DUNE-conform implementation of the entityThis class merely changes the template parameters of the ent...
Definition: geometrygrid/entity.hh:49
Index Set Interface base class.
Definition: common/grid.hh:361
const This & operator=(const This &other)
Definition: geometrygrid/indexsets.hh:54
IndexTypeImp IndexType
The type used for the indices.
Definition: indexidset.hh:90
IndexSet(const HostIndexSet &hostIndexSet)
Definition: geometrygrid/indexsets.hh:46
Types types(int codim) const
Definition: geometrygrid/indexsets.hh:91
Provides base classes for index and id sets.
static const int dimension
Definition: geometrygrid/indexsets.hh:36
IndexType subIndex(const typename Traits::template Codim< cc >::Entity &e, int i, unsigned int codim) const
Map a subentity to an index.
Definition: indexidset.hh:153
Base::IndexType IndexType
Definition: geometrygrid/indexsets.hh:38