3 #ifndef DUNE_POLYHEDRALGRID_ENTITYPOINTER_HH
4 #define DUNE_POLYHEDRALGRID_ENTITYPOINTER_HH
7 #include <dune/grid/common/grid.hh>
10 #include <opm/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 #if DUNE_VERSION_NEWER(DUNE_GRID, 2, 7)
80 return entity_.impl();
82 return Grid::getRealImplementation( entity_ );
86 ExtraData data ()
const {
return entityImpl().data(); }
Definition: entitypointer.hh:19
Traits::template Codim< codimension >::Entity Entity
type of entity
Definition: entitypointer.hh:32
bool equals(const This &other) const
check for equality
Definition: entitypointer.hh:59
int level() const
obtain level
Definition: entitypointer.hh:74
static const int codimension
world dimension
Definition: entitypointer.hh:29
Entity & dereference() const
dereference entity
Definition: entitypointer.hh:65
static const int dimension
grid dimension
Definition: entitypointer.hh:27
Copyright 2019 Equinor AS.
Definition: CartesianIndexMapper.hpp:10