3#ifndef DUNE_GEOGRID_IDSET_HH
4#define DUNE_GEOGRID_IDSET_HH
17 template<
class Gr
id,
class HostIdSet >
19 :
public Dune::IdSet< Grid, IdSet< Grid, HostIdSet >, typename HostIdSet::IdType >
21 typedef IdSet< Grid, HostIdSet > This;
24 typedef typename remove_const< Grid >::type::Traits Traits;
27 typedef typename HostIdSet::IdType IdType;
35 explicit IdSet (
const HostIdSet &hostIdSet )
36 : hostIdSet_( &hostIdSet )
39 IdSet (
const This &other )
40 : hostIdSet_( other.hostIdSet_ )
43 const This &operator= (
const This &other )
45 hostIdSet_ = other.hostIdSet_;
50 IdType
id (
const typename Traits::template Codim< codim >::Entity &entity )
const
52 return Grid::getRealImplementation( entity ).id( hostIdSet() );
55 template<
class Entity >
56 IdType
id (
const Entity &entity )
const
58 return id< Entity::codimension >( entity );
61 IdType
subId (
const typename Traits::template Codim< 0 >::Entity &entity,
int i,
unsigned int codim )
const
63 return hostIdSet().subId( Grid::template getHostEntity< 0 >( entity ), i, codim );
66 operator bool ()
const {
return bool( hostIdSet_ ); }
69 const HostIdSet &hostIdSet ()
const
75 const HostIdSet *hostIdSet_;
Id Set Interface.
Definition: indexidset.hh:414
IdType subId(const typename remove_const< GridImp >::type::Traits::template 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:441
IdType id(const Entity &e) const
Get id of an entity. This method is simpler to use than the one below.
Definition: indexidset.hh:421
Provides base classes for index and id sets.
Dune namespace.
Definition: alignment.hh:10