3 #ifndef DUNE_POLYHEDRALGRID_ENTITYPOINTER_HH 4 #define DUNE_POLYHEDRALGRID_ENTITYPOINTER_HH 7 #include <dune/grid/common/grid.hh> 10 #include <dune/grid/polyhedralgrid/declaration.hh> 17 template<
int codim,
class Gr
id >
23 typedef typename Grid::Traits Traits;
32 typedef typename Traits::template Codim< codimension >::Entity
Entity;
35 typedef typename Traits::ExtraData ExtraData;
37 typedef typename Traits::template Codim< codimension > :: EntityImpl EntityImpl;
41 : entity_( EntityImpl( data ) )
45 : entity_( EntityImpl( entity ) )
48 PolyhedralGridEntityPointer (
const This &other )
49 : entity_( EntityImpl( other.entityImpl() ) )
52 const This &operator= (
const This &other )
54 entityImpl() = other.entityImpl();
61 return entityImpl().equals( other.entityImpl() );
70 operator const Entity& ()
const {
return entity_; }
71 operator Entity& () {
return entity_; }
74 int level ()
const {
return entity_.level(); }
77 EntityImpl &entityImpl ()
const 79 return Grid::getRealImplementation( entity_ );
82 ExtraData data ()
const {
return entityImpl().data(); }
90 #endif // #ifndef DUNE_POLYHEDRALGRID_ENTITYPOINTER_HH Definition: entitypointer.hh:18
Holds the implementation of the CpGrid as a pimple.
Definition: OpmParserIncludes.hpp:42
static const int dimension
grid dimension
Definition: entitypointer.hh:27
static const int codimension
world dimension
Definition: entitypointer.hh:29
bool equals(const This &other) const
check for equality
Definition: entitypointer.hh:59
Entity & dereference() const
dereference entity
Definition: entitypointer.hh:65
int level() const
obtain level
Definition: entitypointer.hh:74
Traits::template Codim< codimension >::Entity Entity
type of entity
Definition: entitypointer.hh:32