dune-grid
2.4
|
Wrapper class for entities. More...
#include <dune/grid/common/entity.hh>
Protected Types | |
typedef EntityImp< cd, dim, GridImp > | Implementation |
Protected Member Functions | |
Implementation & | impl () |
Return reference to the real implementation. More... | |
const Implementation & | impl () const |
Return const reference to the real implementation. More... | |
Protected Attributes | |
Implementation | realEntity |
Exported types and constants | |
enum | { codimension =cd } |
enum | { dimension =dim } |
enum | { mydimension =dim-cd } |
typedef GridImp::template Codim< cd >::Geometry | Geometry |
The corresponding geometry type. More... | |
typedef GridImp::template Codim< cd >::EntitySeed | EntitySeed |
The corresponding entity seed (for storage of entities) More... | |
Methods shared by entities of all codimensions | |
int | level () const |
The level of this entity. More... | |
PartitionType | partitionType () const |
Partition type of this entity. More... | |
Geometry | geometry () const |
obtain geometric realization of the entity More... | |
GeometryType | type () const |
Return the name of the reference element. The type can be used to access the Dune::ReferenceElement. More... | |
EntitySeed | seed () const |
Return the entity seed which contains sufficient information to generate the entity again and uses as little memory as possible. More... | |
bool | operator== (const Entity &other) const |
Compares two entities for equality. More... | |
bool | operator!= (const Entity &other) const |
Compares two entities for inequality. More... | |
template<typename ItImp > | |
bool | operator== (const Dune::EntityPointer< GridImp, ItImp > &other) const |
Compares an Entity with an EntityPointer for equality. More... | |
template<typename ItImp > | |
bool | operator!= (const Dune::EntityPointer< GridImp, ItImp > &other) const |
Compares an Entity with an EntityPointer for inequality. More... | |
Entity () | |
Entity (const Entity &other) | |
Copy constructor from an existing entity. More... | |
Entity (Entity &&other) | |
Move constructor from an existing entity. More... | |
Entity & | operator= (const Entity &other) |
Copy assignment operator from an existing entity. More... | |
Entity & | operator= (Entity &&other) |
Move assignment operator from an existing entity. More... | |
const Entity & | operator* () const |
Dereference Entity to itself for backwards compatibility with EntityPointer. More... | |
const Entity * | operator-> () const |
Dereference Entity to itself for backwards compatibility with EntityPointer. More... | |
Interface for the implementor | |
Entity (const EntityImp< cd, dim, GridImp > &e) | |
Copy constructor from EntityImp. More... | |
Entity (EntityImp< cd, dim, GridImp > &&e) | |
Move constructor from EntityImp. More... | |
Intersection Range | |
Iterator range for intersections . | |
template<typename GV , typename Entity > | |
IteratorRange<...> | intersections (const GV &gv, const Entity &e) |
Iterates over all Intersections of an Entity with respect to the given GridView. More... | |
Hierarchic Entity range | |
Iterator range for hierarchic access to the more-refined entities that result from the subdivision of a given element. | |
template<typename Entity > | |
IteratorRange<...> | descendantElements (const Entity &e, int maxLevel) |
Iterates over all descendant elements of the given element up to a maximum level. More... | |
Wrapper class for entities.
cd | Codimension of the entity |
dim | Dimension of the grid |
GridImp | Type that is a model of Dune::Grid |
EntityImp | Class template that is a model of Dune::Entity |
This class wraps a object of type EntityImp and forwards all member function calls to corresponding members of this class. In that sense Entity defines the interface and EntityImp supplies the implementation. For various reasons we do not use an inheritance hierarchy and the Barton-Nackman trick here.
The Entity class template is specialized for cd=0
(elements, Dune::Entity<0,dim,GridImp,EntityImp>). This case has an extended interface. The methods defined in the general template are provided by the specialization as well. We did not use inheritance because different implementations for different codimensions may be required and virtual functions had to be avoided.
Entities can not be created, assigned or otherwise modified outside the interface in the user code. They are only accessible by immutable iterators provided on the corresponding grid class.
The only way to modify the entities of a grid is through grid adaptation which consists of tagging entities (of codimension 0) for refinement and then calling the adapt() method on the grid.
|
protected |
|
inline |
|
inline |
Copy constructor from an existing entity.
|
inline |
Move constructor from an existing entity.
|
inline |
Copy constructor from EntityImp.
|
inline |
Move constructor from EntityImp.
|
inline |
obtain geometric realization of the entity
Each entity provides an object of type Dune::Geometry< dimension-codimension, dimensionworld, ... > that represents the map from a reference element to world coordinates.
|
inlineprotected |
Return reference to the real implementation.
|
inlineprotected |
Return const reference to the real implementation.
|
inline |
The level of this entity.
Referenced by Dune::YaspPersistentContainerIndex< const YaspGrid< dim, CoordCont > >::index(), and Dune::YaspPersistentContainerIndex< const YaspGrid< dim, CoordCont > >::subIndex().
|
inline |
Compares two entities for inequality.
|
inline |
Compares an Entity with an EntityPointer for inequality.
|
inline |
Dereference Entity to itself for backwards compatibility with EntityPointer.
|
inline |
Dereference Entity to itself for backwards compatibility with EntityPointer.
|
inline |
Copy assignment operator from an existing entity.
|
inline |
Move assignment operator from an existing entity.
|
inline |
Compares two entities for equality.
|
inline |
Compares an Entity with an EntityPointer for equality.
|
inline |
Partition type of this entity.
|
inline |
Return the entity seed which contains sufficient information to generate the entity again and uses as little memory as possible.
|
inline |
Return the name of the reference element. The type can be used to access the Dune::ReferenceElement.
|
protected |
Referenced by Dune::Entity< codim, dim, Grid, EntityImp >::impl(), Dune::Entity< 0, dim, GridImp, EntityImp >::impl(), Dune::Entity< codim, dim, Grid, EntityImp >::operator!=(), Dune::Entity< 0, dim, GridImp, EntityImp >::operator!=(), Dune::Entity< codim, dim, Grid, EntityImp >::operator=(), Dune::Entity< 0, dim, GridImp, EntityImp >::operator=(), Dune::Entity< codim, dim, Grid, EntityImp >::operator==(), and Dune::Entity< 0, dim, GridImp, EntityImp >::operator==().