Go to the documentation of this file.
3 #ifndef DUNE_GRID_ENTITY_HH
4 #define DUNE_GRID_ENTITY_HH
6 #include <dune/common/iteratorrange.hh>
7 #include <dune/common/typetraits.hh>
9 #include <dune/geometry/dimension.hh>
60 template<
int cd,
int dim,
class Gr
idImp,
template<
int,
int,
class>
class EntityImp>
63 #if DUNE_GRID_EXPERIMENTAL_GRID_EXTENSIONS
69 GridImp::
dimension, GridImp::dimensionworld,
70 typename GridImp::ctype,
71 typename GridImp::GridFamily> ;
97 typedef typename GridImp::template Codim<cd>::Geometry
Geometry;
100 typedef typename GridImp::template Codim<cd>::EntitySeed
EntitySeed;
230 template<
int dim,
class Gr
idImp,
template<
int,
int,
class>
class EntityImp>
233 #if DUNE_GRID_EXPERIMENTAL_GRID_EXTENSIONS
239 GridImp::
dimension, GridImp::dimensionworld,
240 typename GridImp::ctype,
241 typename GridImp::GridFamily> ;
267 typedef typename GridImp::template Codim<0>::Geometry
Geometry;
270 typedef typename GridImp::template Codim<0>::EntitySeed
EntitySeed;
398 template<
int codim >
399 typename Codim< codim >::Entity
402 return realEntity.template subEntity< codim >( i );
542 template<
int cd,
int dim,
class Gr
idImp,
template<
int,
int,
class>
class EntityImp>
556 typedef typename GridImp::template Codim<cd>::EntitySeed
EntitySeed;
565 EntityImp<cd,dim,GridImp>& asImp ()
567 return static_cast<EntityImp<cd,dim,GridImp>&
>(*this);
569 const EntityImp<cd,dim,GridImp>& asImp ()
const
571 return static_cast<const EntityImp<cd,dim,GridImp>&
>(*this);
586 template<
int dim,
class Gr
idImp,
template<
int,
int,
class>
class EntityImp>
600 typedef typename GridImp::template Codim<0>::EntitySeed
EntitySeed;
614 bool isNew ()
const {
return false; }
637 EntityImp<0,dim,GridImp>& asImp () {
return static_cast<EntityImp<0,dim,GridImp>&
>(*this); }
638 const EntityImp<0,dim,GridImp>& asImp ()
const {
return static_cast<const EntityImp<0,dim,GridImp>&
>(*this); }
643 #endif // DUNE_GRID_ENTITY_HH
Different resources needed by all grid implementations.
bool isLeaf() const
Returns true if the entity is contained in the leaf grid.
Definition: common/entity.hh:429
Entity & operator=(const Entity &other)
Copy assignment operator from an existing entity.
Definition: common/entity.hh:357
bool isRegular() const
Returns true if element is of regular type in red/green type refinement. In bisection or hanging node...
Definition: common/entity.hh:437
Entity(EntityImp< cd, dim, GridImp > &&e)
Move constructor from EntityImp.
Definition: common/entity.hh:205
GeometryType type() const
Return the name of the reference element. The type can be used to access the Dune::ReferenceElement.
Definition: common/entity.hh:610
Include standard header files.
Definition: agrid.hh:59
Codim< codim >::Entity subEntity(int i) const
Obtain a subentity.
Definition: common/entity.hh:400
bool mightVanish() const
Returns true, if entity might disappear during the next call to adapt(). If the method returns false,...
Definition: common/entity.hh:502
Entity father() const
Inter-level access to father entity on the next-coarser grid. The given entity resulted directly from...
Definition: common/entity.hh:415
GridImp::template Codim< cd >::Entity Entity
Definition: common/entity.hh:285
unsigned int subEntities(unsigned int codim) const
Number of subentities with codimension codim.
Definition: common/entity.hh:383
EntitySeed seed() const
Return the entity seed which contains sufficient information to generate the entity again and uses as...
Definition: common/entity.hh:152
GridImp::template Codim< 0 >::LocalGeometry LocalGeometry
The geometry type of this entity when the geometry is expressed embedded in the father element.
Definition: common/entity.hh:279
Know your own codimension.
Definition: common/entity.hh:104
EntityImp< cd, dim, Grid > Implementation
Definition: common/entity.hh:78
bool mightVanish() const
Returns true, if entity might disappear during the next call to adapt()
Definition: common/entity.hh:618
Mesh entities of codimension 0 ("elements") allow to visit all intersections with "neighboring" eleme...
Definition: common/grid.hh:345
Entity(const Entity &other)
Copy constructor from an existing entity.
Definition: common/entity.hh:170
Definition: common/entity.hh:547
GridImp::HierarchicIterator HierarchicIterator
The HierarchicIterator type.
Definition: common/entity.hh:289
Entity(Entity &&other)
Move constructor from an existing entity.
Definition: common/entity.hh:352
EntitySeed seed() const
Return the entity seed which contains sufficient information to generate the entity again and uses as...
Definition: common/entity.hh:329
bool isNew() const
Returns true, if the entity has been created during the last call to adapt()
Definition: common/entity.hh:496
bool operator==(const Entity &other) const
Compares two entities for equality.
Definition: common/entity.hh:332
GeometryType type() const
Return the name of the reference element. The type can be used to access the Dune::ReferenceElement.
Definition: common/entity.hh:561
PartitionType
Attributes used in the generic overlap model.
Definition: gridenums.hh:28
GeometryType
Type representing VTK's entity geometry types.
Definition: common.hh:178
bool hasBoundaryIntersections() const
Returns true, if entity has intersections with boundary.
Definition: common/entity.hh:506
bool isNew() const
Returns true, if the entity has been created during the last call to adapt()
Definition: common/entity.hh:614
GridImp::template Codim< cd >::EntitySeed EntitySeed
The corresponding entity seed (for storage of entities)
Definition: common/entity.hh:100
bool hasFather() const
Return true if entity has a father entity which can be accessed using the father() method.
Definition: common/entity.hh:423
GridImp::template Codim< 0 >::Geometry Geometry
The geometry type of this entity.
Definition: common/entity.hh:267
GeometryType type() const
Return the name of the reference element. The type can be used to access the Dune::ReferenceElement.
Definition: common/entity.hh:324
GridImp::template Codim< 0 >::EntitySeed EntitySeed
The corresponding entity seed (for storage of entities)
Definition: common/entity.hh:600
Wrapper class for entities.
Definition: common/entity.hh:61
Definition: common/entity.hh:550
const Implementation & impl() const
Return const reference to the real implementation.
Definition: common/entity.hh:253
Entity(const EntityImp< 0, dim, GridImp > &e)
Copy constructor from EntityImp.
Definition: common/entity.hh:516
Entity(const Entity &other)
Copy constructor from an existing entity.
Definition: common/entity.hh:347
Geometry geometry() const
obtain geometric realization of the entity
Definition: common/entity.hh:319
bool operator!=(const Entity &other) const
Compares two entities for inequality.
Definition: common/entity.hh:161
Implementation realEntity
Definition: common/entity.hh:256
GridImp::template Codim< cd >::Geometry Geometry
The corresponding geometry type.
Definition: common/entity.hh:97
int level() const
The level of this entity.
Definition: common/entity.hh:313
bool hasBoundaryIntersections() const
Returns true, if entity has intersections with boundary, this implementation uses the Level- and Leaf...
Definition: common/entity.hh:624
bool isRegular() const
Returns true if element is of regular type in red/green type refinement. In bisection or hanging node...
Definition: common/entity.hh:605
Definition: common/geometry.hh:24
Entity & operator=(const Entity &other)
Copy assignment operator from an existing entity.
Definition: common/entity.hh:180
LocalGeometry geometryInFather() const
Provides information how this element has been subdivided from its father element.
Definition: common/entity.hh:464
GridImp::template Codim< 0 >::EntitySeed EntitySeed
The corresponding entity seed (for storage of entities)
Definition: common/entity.hh:270
Entity(Entity &&other)
Move constructor from an existing entity.
Definition: common/entity.hh:175
PartitionType partitionType() const
Partition type of this entity.
Definition: common/entity.hh:316
Implementation realEntity
Definition: common/entity.hh:86
HierarchicIterator hbegin(int maxLevel) const
Inter-level access to elements that resulted from (recursive) subdivision of this element.
Definition: common/entity.hh:477
GridImp::template Codim< cd >::EntitySeed EntitySeed
The corresponding entity seed (for storage of entities)
Definition: common/entity.hh:556
Implementation & impl()
Return reference to the real implementation.
Definition: common/entity.hh:81
Entity(const EntityImp< cd, dim, GridImp > &e)
Copy constructor from EntityImp.
Definition: common/entity.hh:202
bool operator!=(const Entity &other) const
Compares two entities for inequality.
Definition: common/entity.hh:338
int level() const
The level of this entity.
Definition: common/entity.hh:125
Entity()
Definition: common/entity.hh:343
GeometryType type() const
Return the name of the reference element. The type can be used to access the Dune::ReferenceElement.
Definition: common/entity.hh:147
Definition: defaultgridview.hh:16
Geometry geometry() const
obtain geometric realization of the entity
Definition: common/entity.hh:142
Entity & operator=(Entity &&other)
Move assignment operator from an existing entity.
Definition: common/entity.hh:364
Entity()
Definition: common/entity.hh:166
Wrapper and interface class for a static iterator (EntityPointer)
bool operator==(const Entity &other) const
Compares two entities for equality.
Definition: common/entity.hh:155
const Implementation & impl() const
Return const reference to the real implementation.
Definition: common/entity.hh:83
Definition: defaultgridview.hh:19
HierarchicIterator hend(int maxLevel) const
Returns iterator to one past the last son element.
Definition: common/entity.hh:489
Know the grid dimension.
Definition: common/entity.hh:108
Dimensionality of the reference element of the entity.
Definition: common/entity.hh:112
PartitionType partitionType() const
Partition type of this entity.
Definition: common/entity.hh:128
Wrapper class for pointers to entities.
Definition: common/entitypointer.hh:113
Entity & operator=(Entity &&other)
Move assignment operator from an existing entity.
Definition: common/entity.hh:187
Entity(EntityImp< 0, dim, GridImp > &&e)
Move constructor from EntityImp.
Definition: common/entity.hh:519
Definition: common/entity.hh:553
Default Implementations for EntityImp.
Definition: common/entity.hh:543