Dune::Entity< cd, dim, GridImp, EntityImp > Class Template Reference
[Entity]

Wrapper class for entities. More...

#include <dune/grid/common/entity.hh>

Inheritance diagram for Dune::Entity< cd, dim, GridImp, EntityImp >:
Inheritance graph

List of all members.

Public Member Functions

GeometryType type () const
 Return the name of the reference element. The type can be used to access the Dune::GenericReferenceElement.
EntitySeed seed () const
 Return the entity seed which contains sufficient information to generate the entity again and uses as less memory as possible.

Protected Types

typedef remove_const< GridImp >
::type 
mutableGridImp

Protected Attributes

EntityImp< cd, dim, GridImp > realEntity

Exported types and constants



enum  { codimension = cd }
enum  { dimension = dim }
enum  { mydimension = dim-cd }
enum  { dimensionworld = GridImp::dimensionworld }
typedef EntityImp< cd, dim,
GridImp > 
ImplementationType
typedef GridImp::template
Codim< cd >::Geometry 
Geometry
 The corresponding geometry type.
typedef GridImp::template
Codim< cd >::EntitySeed 
EntitySeed
 The corresponding entity seed (for storage of entities).
typedef GridImp::ctype ctype
 coordinate type of the Grid

Protected methods



class GridDefaultImplementation< GridImp::dimension, GridImp::dimensionworld, typename GridImp::ctype, typename GridImp::GridFamily >
class Dune::EntityPointer< GridImp, typename GridImp::GridFamily::Traits::template Codim< cd >::EntityPointerImpl >
EntityImp< cd, dim, GridImp > & getRealImp ()
 return reference to the real implementation
const EntityImp< cd, dim,
GridImp > & 
getRealImp () const
 return const reference to the real implementation
 Entity (const Entity &rhs)
Entityoperator= (const Entity &rhs)

Methods shared by entities of all codimensions



int level () const
 The level of this entity.
PartitionType partitionType () const
 Partition type of this entity.
const Geometrygeometry () const
 Each entity encapsulates an object of type Dune::Geometry<dimension-codimension,dimensionworld,...> that gives (among other things) the map from a reference element to world coordinates. This method delivers a const reference to such a geometry.

Interface for the implementor



 Entity (const EntityImp< cd, dim, GridImp > &e)
 Copy constructor from EntityImp.

Detailed Description

template<int cd, int dim, class GridImp, template< int, int, class > class EntityImp>
class Dune::Entity< cd, dim, GridImp, EntityImp >

Wrapper class for entities.

Template parameters are:

  • 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

Engine Concept

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.

Specialization

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.

View concept

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.


Member Typedef Documentation

template<int cd, int dim, class GridImp, template< int, int, class > class EntityImp>
typedef GridImp::ctype Dune::Entity< cd, dim, GridImp, EntityImp >::ctype

coordinate type of the Grid

Reimplemented in Dune::Entity< 0, dim, GridImp, EntityImp >.

template<int cd, int dim, class GridImp, template< int, int, class > class EntityImp>
typedef GridImp::template Codim<cd>::EntitySeed Dune::Entity< cd, dim, GridImp, EntityImp >::EntitySeed

The corresponding entity seed (for storage of entities).

Reimplemented in Dune::Entity< 0, dim, GridImp, EntityImp >.

template<int cd, int dim, class GridImp, template< int, int, class > class EntityImp>
typedef GridImp::template Codim<cd>::Geometry Dune::Entity< cd, dim, GridImp, EntityImp >::Geometry

The corresponding geometry type.

Reimplemented in Dune::Entity< 0, dim, GridImp, EntityImp >.

template<int cd, int dim, class GridImp, template< int, int, class > class EntityImp>
typedef EntityImp<cd,dim,GridImp> Dune::Entity< cd, dim, GridImp, EntityImp >::ImplementationType
template<int cd, int dim, class GridImp, template< int, int, class > class EntityImp>
typedef remove_const<GridImp>::type Dune::Entity< cd, dim, GridImp, EntityImp >::mutableGridImp [protected]

Member Enumeration Documentation

template<int cd, int dim, class GridImp, template< int, int, class > class EntityImp>
anonymous enum
Enumerator:
codimension 

Know your own codimension.

template<int cd, int dim, class GridImp, template< int, int, class > class EntityImp>
anonymous enum
Enumerator:
dimension 

Know the grid dimension.

template<int cd, int dim, class GridImp, template< int, int, class > class EntityImp>
anonymous enum
Enumerator:
mydimension 

Dimensionality of the reference element of the entity.

template<int cd, int dim, class GridImp, template< int, int, class > class EntityImp>
anonymous enum
Enumerator:
dimensionworld 

Know the dimension of world.


Constructor & Destructor Documentation

template<int cd, int dim, class GridImp, template< int, int, class > class EntityImp>
Dune::Entity< cd, dim, GridImp, EntityImp >::Entity ( const EntityImp< cd, dim, GridImp > &  e  )  [inline, explicit]

Copy constructor from EntityImp.

template<int cd, int dim, class GridImp, template< int, int, class > class EntityImp>
Dune::Entity< cd, dim, GridImp, EntityImp >::Entity ( const Entity< cd, dim, GridImp, EntityImp > &  rhs  )  [inline, protected]

hide copy constructor

Reimplemented in Dune::Entity< 0, dim, GridImp, EntityImp >.


Member Function Documentation

template<int cd, int dim, class GridImp, template< int, int, class > class EntityImp>
const Geometry& Dune::Entity< cd, dim, GridImp, EntityImp >::geometry (  )  const [inline]

Each entity encapsulates an object of type Dune::Geometry<dimension-codimension,dimensionworld,...> that gives (among other things) the map from a reference element to world coordinates. This method delivers a const reference to such a geometry.

Note:
Be careful when storing such references. If the state of any object is changed, e.g. an iterator is advanced, there is no guarantee that the reference remains valid.

Reimplemented in Dune::Entity< 0, dim, GridImp, EntityImp >.

References Dune::Entity< cd, dim, GridImp, EntityImp >::realEntity.

template<int cd, int dim, class GridImp, template< int, int, class > class EntityImp>
EntityImp<cd,dim,GridImp>& Dune::Entity< cd, dim, GridImp, EntityImp >::getRealImp (  )  [inline, protected]

return reference to the real implementation

Reimplemented in Dune::Entity< 0, dim, GridImp, EntityImp >.

References Dune::Entity< cd, dim, GridImp, EntityImp >::realEntity.

template<int cd, int dim, class GridImp, template< int, int, class > class EntityImp>
const EntityImp<cd,dim,GridImp>& Dune::Entity< cd, dim, GridImp, EntityImp >::getRealImp (  )  const [inline, protected]

return const reference to the real implementation

Reimplemented in Dune::Entity< 0, dim, GridImp, EntityImp >.

References Dune::Entity< cd, dim, GridImp, EntityImp >::realEntity.

template<int cd, int dim, class GridImp, template< int, int, class > class EntityImp>
int Dune::Entity< cd, dim, GridImp, EntityImp >::level (  )  const [inline]
template<int cd, int dim, class GridImp, template< int, int, class > class EntityImp>
Entity& Dune::Entity< cd, dim, GridImp, EntityImp >::operator= ( const Entity< cd, dim, GridImp, EntityImp > &  rhs  )  [inline, protected]
template<int cd, int dim, class GridImp, template< int, int, class > class EntityImp>
PartitionType Dune::Entity< cd, dim, GridImp, EntityImp >::partitionType (  )  const [inline]
template<int cd, int dim, class GridImp, template< int, int, class > class EntityImp>
EntitySeed Dune::Entity< cd, dim, GridImp, EntityImp >::seed (  )  const [inline]

Return the entity seed which contains sufficient information to generate the entity again and uses as less memory as possible.

Reimplemented in Dune::Entity< 0, dim, GridImp, EntityImp >.

References Dune::Entity< cd, dim, GridImp, EntityImp >::realEntity.

template<int cd, int dim, class GridImp, template< int, int, class > class EntityImp>
GeometryType Dune::Entity< cd, dim, GridImp, EntityImp >::type (  )  const [inline]

Return the name of the reference element. The type can be used to access the Dune::GenericReferenceElement.

Reimplemented in Dune::Entity< 0, dim, GridImp, EntityImp >.

References Dune::Entity< cd, dim, GridImp, EntityImp >::realEntity.


Friends And Related Function Documentation

template<int cd, int dim, class GridImp, template< int, int, class > class EntityImp>
friend class Dune::EntityPointer< GridImp,typename GridImp::GridFamily::Traits::template Codim< cd >::EntityPointerImpl > [friend]
template<int cd, int dim, class GridImp, template< int, int, class > class EntityImp>
friend class GridDefaultImplementation< GridImp::dimension, GridImp::dimensionworld,typename GridImp::ctype,typename GridImp::GridFamily > [friend]

Member Data Documentation

template<int cd, int dim, class GridImp, template< int, int, class > class EntityImp>
EntityImp<cd,dim,GridImp> Dune::Entity< cd, dim, GridImp, EntityImp >::realEntity [protected]

Reimplemented in Dune::Entity< 0, dim, GridImp, EntityImp >.

Referenced by Dune::Entity< 0, dim, GridImp, EntityImp >::count(), Dune::Entity< 0, dim, GridImp, EntityImp >::father(), Dune::Entity< 0, dim, GridImp, EntityImp >::geometry(), Dune::Entity< cd, dim, GridImp, EntityImp >::geometry(), Dune::Entity< 0, dim, GridImp, EntityImp >::geometryInFather(), Dune::Entity< 0, dim, GridImp, EntityImp >::getRealImp(), Dune::Entity< cd, dim, GridImp, EntityImp >::getRealImp(), Dune::Entity< 0, dim, GridImp, EntityImp >::hasBoundaryIntersections(), Dune::Entity< 0, dim, GridImp, EntityImp >::hasFather(), Dune::Entity< 0, dim, GridImp, EntityImp >::hbegin(), Dune::Entity< 0, dim, GridImp, EntityImp >::hend(), Dune::Entity< 0, dim, GridImp, EntityImp >::ileafbegin(), Dune::Entity< 0, dim, GridImp, EntityImp >::ileafend(), Dune::Entity< 0, dim, GridImp, EntityImp >::ilevelbegin(), Dune::Entity< 0, dim, GridImp, EntityImp >::ilevelend(), Dune::Entity< 0, dim, GridImp, EntityImp >::isLeaf(), Dune::Entity< 0, dim, GridImp, EntityImp >::isNew(), Dune::Entity< 0, dim, GridImp, EntityImp >::isRegular(), Dune::Entity< 0, dim, GridImp, EntityImp >::level(), Dune::Entity< cd, dim, GridImp, EntityImp >::level(), Dune::Entity< 0, dim, GridImp, EntityImp >::mightVanish(), Dune::Entity< 0, dim, GridImp, EntityImp >::operator=(), Dune::Entity< cd, dim, GridImp, EntityImp >::operator=(), Dune::Entity< 0, dim, GridImp, EntityImp >::partitionType(), Dune::Entity< cd, dim, GridImp, EntityImp >::partitionType(), Dune::Entity< 0, dim, GridImp, EntityImp >::seed(), Dune::Entity< cd, dim, GridImp, EntityImp >::seed(), Dune::Entity< 0, dim, GridImp, EntityImp >::subEntity(), Dune::Entity< 0, dim, GridImp, EntityImp >::type(), and Dune::Entity< cd, dim, GridImp, EntityImp >::type().


The documentation for this class was generated from the following file:

Generated on Fri Apr 29 2011 with Doxygen (ver 1.7.1) [doxygen-log,error-log].