5#ifndef DUNE_GEOGRID_IDSET_HH
6#define DUNE_GEOGRID_IDSET_HH
19 template<
class Gr
id,
class HostIdSet >
21 :
public Dune::IdSet< Grid, IdSet< Grid, HostIdSet >, typename HostIdSet::IdType >
26 typedef typename std::remove_const< Grid >::type::Traits Traits;
29 typedef typename HostIdSet::IdType
IdType;
37 explicit IdSet (
const HostIdSet &hostIdSet )
38 : hostIdSet_( &hostIdSet )
42 : hostIdSet_( other.hostIdSet_ )
47 hostIdSet_ = other.hostIdSet_;
52 IdType id (
const typename Traits::template Codim< codim >::Entity &entity )
const
54 return entity.impl().id( hostIdSet() );
57 template<
class Entity >
60 return id< Entity::codimension >( entity );
63 IdType subId (
const typename Traits::template Codim< 0 >::Entity &entity,
int i,
unsigned int codim )
const
65 return hostIdSet().subId( Grid::template getHostEntity< 0 >( entity ), i, codim );
68 explicit operator bool ()
const {
return bool( hostIdSet_ ); }
71 const HostIdSet &hostIdSet ()
const
77 const HostIdSet *hostIdSet_;
Provides base classes for index and id sets.
Include standard header files.
Definition: agrid.hh:60
Id Set Interface.
Definition: indexidset.hh:452
IdType subId(const typename Codim< 0 >::Entity &e, int i, unsigned int codim) const
Get id of subentity i of co-dimension codim of a co-dimension 0 entity.
Definition: indexidset.hh:486
DUNE-conform implementation of the entity.
Definition: geometrygrid/entity.hh:694
IdSet()
Definition: idset.hh:33
IdSet(const HostIdSet &hostIdSet)
Definition: idset.hh:37
IdType id(const Entity &entity) const
Definition: idset.hh:58
IdType subId(const typename Traits::template Codim< 0 >::Entity &entity, int i, unsigned int codim) const
Definition: idset.hh:63
IdType id(const typename Traits::template Codim< codim >::Entity &entity) const
Definition: idset.hh:52
IdSet(const This &other)
Definition: idset.hh:41
const This & operator=(const This &other)
Definition: idset.hh:45
HostIdSet::IdType IdType
Definition: idset.hh:29