dune-grid  2.3.1
Classes | Protected Types | Protected Member Functions | Protected Attributes | Friends | List of all members
Dune::Entity< 0, dim, GridImp, EntityImp > Class Template Reference

Template specialization of Dune::Entity for Elements (codim==0) More...

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

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

Classes

struct  Codim
 EntityPointer types of the different codimensions. More...
 

Protected Types

typedef EntityImp< 0, dim,
GridImp > 
Implementation
 

Protected Member Functions

Implementationimpl ()
 Return reference to the real implementation. More...
 
const Implementationimpl () const
 Return const reference to the real implementation. More...
 
 Entity (const Entity &rhs)
 
Entityoperator= (const Entity &rhs)
 

Protected Attributes

Implementation realEntity
 

Friends

class GridDefaultImplementation< GridImp::dimension, GridImp::dimensionworld, typename GridImp::ctype, typename GridImp::GridFamily >
 
template<class , PartitionIteratorType >
class DefaultLevelGridView
 
template<class , PartitionIteratorType >
class DefaultLeafGridView
 
template<class , class >
class Dune::EntityPointer
 

Exported types and constants

enum  { codimension =cd }
 
enum  { dimension =dim }
 
enum  { mydimension =dim-cd }
 

Exported types and constants

enum  { codimension =0 }
 
enum  { dimension =dim }
 
enum  { mydimension =dim }
 
typedef GridImp::template
Codim< 0 >::Geometry 
Geometry
 The geometry type of this entity. More...
 
typedef GridImp::template
Codim< 0 >::EntitySeed 
EntitySeed
 The corresponding entity seed (for storage of entities) More...
 
typedef GridImp::template
Codim< 0 >::LocalGeometry 
LocalGeometry
 The geometry type of this entity when the geometry is expressed embedded in the father element. More...
 
typedef GridImp::template
Codim< 0 >::EntityPointer 
EntityPointer
 The codim==0 EntityPointer type. More...
 
typedef
GridImp::LeafIntersectionIterator 
LeafIntersectionIterator
 The Dune::IntersectionIterator type for the LeafGridView. More...
 
typedef
GridImp::LevelIntersectionIterator 
LevelIntersectionIterator
 The Dune::IntersectionIterator type for the LevelGridView. More...
 
typedef GridImp::HierarchicIterator HierarchicIterator
 The HierarchicIterator type. More...
 
typedef GridImp::ctype ctype
 Type used for coordinates. More...
 
static const int dimensionworld =GridImp::dimensionworld
 Know the world dimension. 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...
 

Extended interface of entities of codimension 0

template<int cc>
int count () const
 Number of subentities with codimension cc. More...
 
template<int codim>
Codim< codim >::EntityPointer subEntity (int i) const
 Obtain a pointer to a subentity. More...
 
LeafIntersectionIterator ileafbegin () const
 Access to intersections with neighboring leaf elements. A neighbor is an entity of codimension 0 which has an intersection of codimension 1 in common with this entity. Access to those neighbors is provided using the IntersectionIterator. This method returns an iterator refering to the first neighbor. More...
 
LeafIntersectionIterator ileafend () const
 Reference to an IntersectionIterator one past the last intersection. More...
 
LevelIntersectionIterator ilevelbegin () const
 Intra-level access to intersections with neighboring elements. A neighbor is an entity of codimension 0 which has an intersection of codimension 1 in common with this entity. Access to those neighbors is provided using the IntersectionIterator. This method returns an iterator refering to the first neighbor. More...
 
LevelIntersectionIterator ilevelend () const
 Reference to an IntersectionIterator one past the last intersection. More...
 
EntityPointer father () const
 Inter-level access to father entity on the next-coarser grid. The given entity resulted directly from a subdivision of its father entity. For the macro elements dereferencing the EntityPointer is undefined. More...
 
bool hasFather () const
 Return true if entity has a father entity which can be accessed using the father() method. More...
 
bool isLeaf () const
 Returns true if the entity is contained in the leaf grid. More...
 
bool isRegular () const
 Returns true if element is of regular type in red/green type refinement. In bisection or hanging node refinement this is always true. More...
 
LocalGeometry geometryInFather () const
 Provides information how this element has been subdivided from its father element. More...
 
HierarchicIterator hbegin (int maxlevel) const
 Inter-level access to elements that resulted from (recursive) subdivision of this element. More...
 
HierarchicIterator hend (int maxlevel) const
 Returns iterator to one past the last son element. More...
 
bool isNew () const
 Returns true, if the entity has been created during the last call to adapt() More...
 
bool mightVanish () const
 Returns true, if entity might disappear during the next call to adapt(). If the method returns false, the entity is guaranteed to still be present after adaptation. More...
 

Interface for the implementor

bool hasBoundaryIntersections () const
 Returns true, if entity has intersections with boundary. More...
 
 Entity (const EntityImp< 0, dim, GridImp > &e)
 Copy constructor from EntityImp. More...
 

Detailed Description

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

Template specialization of Dune::Entity for Elements (codim==0)

Template Parameters
dimDimension of the grid
GridImpType that is a model of Dune::Grid
EntityImpClass template that is a model of Dune::Entity
See also
Dune::Entity (general version) for the full documentation

<int cd, int dim, class GridImp, template<int,int,class> class EntityImp>

Member Typedef Documentation

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

Type used for coordinates.

Deprecated:
"Use Geometry::ctype instead!"
template<int dim, class GridImp , template< int, int, class > class EntityImp>
typedef GridImp::template Codim<0>::EntityPointer Dune::Entity< 0, dim, GridImp, EntityImp >::EntityPointer

The codim==0 EntityPointer type.

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

The corresponding entity seed (for storage of entities)

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

The geometry type of this entity.

template<int dim, class GridImp , template< int, int, class > class EntityImp>
typedef GridImp::HierarchicIterator Dune::Entity< 0, dim, GridImp, EntityImp >::HierarchicIterator

The HierarchicIterator type.

template<int dim, class GridImp , template< int, int, class > class EntityImp>
typedef EntityImp< 0, dim, GridImp > Dune::Entity< 0, dim, GridImp, EntityImp >::Implementation
protected
template<int dim, class GridImp , template< int, int, class > class EntityImp>
typedef GridImp::LeafIntersectionIterator Dune::Entity< 0, dim, GridImp, EntityImp >::LeafIntersectionIterator

The Dune::IntersectionIterator type for the LeafGridView.

Deprecated:
Will be removed in the release after dune-grid-2.3
template<int dim, class GridImp , template< int, int, class > class EntityImp>
typedef GridImp::LevelIntersectionIterator Dune::Entity< 0, dim, GridImp, EntityImp >::LevelIntersectionIterator

The Dune::IntersectionIterator type for the LevelGridView.

Deprecated:
Will be removed in the release after dune-grid-2.3
template<int dim, class GridImp , template< int, int, class > class EntityImp>
typedef GridImp::template Codim<0>::LocalGeometry Dune::Entity< 0, dim, GridImp, EntityImp >::LocalGeometry

The geometry type of this entity when the geometry is expressed embedded in the father element.

This differs from Geometry in particular when dim != dimworld, but even when dim == dimworld the implementation may choose to use a different type here.

Member Enumeration Documentation

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

Know your own codimension.

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

Know the grid dimension.

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

Dimensionality of the reference element of the entity.

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

Know your own codimension.

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

Know the grid's dimension.

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

Know dimension of the entity.

Constructor & Destructor Documentation

template<int dim, class GridImp , template< int, int, class > class EntityImp>
Dune::Entity< 0, dim, GridImp, EntityImp >::Entity ( const EntityImp< 0, dim, GridImp > &  e)
inlineexplicit

Copy constructor from EntityImp.

template<int dim, class GridImp , template< int, int, class > class EntityImp>
Dune::Entity< 0, dim, GridImp, EntityImp >::Entity ( const Entity< 0, dim, GridImp, EntityImp > &  rhs)
inlineprotected

hide copy constructor

Member Function Documentation

template<int dim, class GridImp , template< int, int, class > class EntityImp>
template<int cc>
int Dune::Entity< 0, dim, GridImp, EntityImp >::count ( ) const
inline

Number of subentities with codimension cc.

Strictly speaking this method is redundant, because the same information can be obtained from the corresponding reference element. It is here for efficiency reasons only.

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

template<int dim, class GridImp , template< int, int, class > class EntityImp>
EntityPointer Dune::Entity< 0, dim, GridImp, EntityImp >::father ( ) const
inline

Inter-level access to father entity on the next-coarser grid. The given entity resulted directly from a subdivision of its father entity. For the macro elements dereferencing the EntityPointer is undefined.

Note
If the partitionType of the Entity is GhostEntity, it is not guaranteed that this method is working or implemented in general. For some grids it might be available, though.

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

template<int dim, class GridImp , template< int, int, class > class EntityImp>
Geometry Dune::Entity< 0, dim, GridImp, EntityImp >::geometry ( ) const
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.

Note
Previously, the geometry was encapsulated in the entity object and a const reference was returned.
The returned geometry object is guaranteed to remain valid until the grid is modified (or deleted).

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

template<int dim, class GridImp , template< int, int, class > class EntityImp>
LocalGeometry Dune::Entity< 0, dim, GridImp, EntityImp >::geometryInFather ( ) const
inline

Provides information how this element has been subdivided from its father element.

The returned LocalGeometry is a model of Dune::Geometry<dimension,dimension,...>, mapping the reference element of the given entity to the reference element of its father.

This information is sufficient to interpolate all degrees of freedom in the conforming case. Nonconforming may require access to neighbors of the father and calculations with local coordinates. The on-the-fly case is somewhat inefficient since degrees of freedom may be visited several times. If we store interpolation matrices, this is tolerable. We assume that on-the-fly implementation of interpolation is only done for simple discretizations.

Note
For ghost entities, this method is not guaranteed to be implemented.
Previously, the geometry was encapsulated in the entity object and a const reference was returned.
The returned geometry object is guaranteed to remain valid until the grid is modified (or deleted).

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

template<int dim, class GridImp , template< int, int, class > class EntityImp>
bool Dune::Entity< 0, dim, GridImp, EntityImp >::hasBoundaryIntersections ( ) const
inline

Returns true, if entity has intersections with boundary.

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

template<int dim, class GridImp , template< int, int, class > class EntityImp>
bool Dune::Entity< 0, dim, GridImp, EntityImp >::hasFather ( ) const
inline

Return true if entity has a father entity which can be accessed using the father() method.

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

template<int dim, class GridImp , template< int, int, class > class EntityImp>
HierarchicIterator Dune::Entity< 0, dim, GridImp, EntityImp >::hbegin ( int  maxlevel) const
inline

Inter-level access to elements that resulted from (recursive) subdivision of this element.

Parameters
[in]maxlevelIterator does not stop at elements with level greater than maxlevel.
Returns
Iterator to the first son (level is not greater than maxlevel)
Note
If the partitionType of the Entity is GhostEntity, it is not guaranteed that this method is working or implemented in general. For some grids it might be available, though.

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

template<int dim, class GridImp , template< int, int, class > class EntityImp>
HierarchicIterator Dune::Entity< 0, dim, GridImp, EntityImp >::hend ( int  maxlevel) const
inline

Returns iterator to one past the last son element.

Note
If the partitionType of the Entity is GhostEntity, it is not guaranteed that this method is working or implemented in general. For some grids it might be available, though.

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

template<int dim, class GridImp , template< int, int, class > class EntityImp>
LeafIntersectionIterator Dune::Entity< 0, dim, GridImp, EntityImp >::ileafbegin ( ) const
inline

Access to intersections with neighboring leaf elements. A neighbor is an entity of codimension 0 which has an intersection of codimension 1 in common with this entity. Access to those neighbors is provided using the IntersectionIterator. This method returns an iterator refering to the first neighbor.

Note
If the partitionType of the Entity is GhostEntity, this method might give you only one neighbor, which is the interior Entity the GhostEntity is connected to.
Deprecated:
This method is deprecated and will be removed after Dune 2.3. Use LeafGridView.ibegin(Entity) instead.
Deprecated:
"Use LeafGridView.ibegin(Entity) instead."

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

template<int dim, class GridImp , template< int, int, class > class EntityImp>
LeafIntersectionIterator Dune::Entity< 0, dim, GridImp, EntityImp >::ileafend ( ) const
inline

Reference to an IntersectionIterator one past the last intersection.

Note
If the partitionType of the Entity is GhostEntity, this method might give you only one neighbor, which is the interior Entity the GhostEntity is connected to.
Deprecated:
This method is deprecated and will be removed after Dune 2.3. Use LeafGridView.iend(Entity) instead.
Deprecated:
"Use LeafGridView.iend(Entity) instead."

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

template<int dim, class GridImp , template< int, int, class > class EntityImp>
LevelIntersectionIterator Dune::Entity< 0, dim, GridImp, EntityImp >::ilevelbegin ( ) const
inline

Intra-level access to intersections with neighboring elements. A neighbor is an entity of codimension 0 which has an intersection of codimension 1 in common with this entity. Access to those neighbors is provided using the IntersectionIterator. This method returns an iterator refering to the first neighbor.

Note
If the partitionType of the Entity is GhostEntity, this method might give you only one neighbor, which is the interior Entity the GhostEntity is connected to.
Deprecated:
This method is deprecated and will be removed after Dune 2.3. Use LevelGridView.ibegin(Entity) instead.
Deprecated:
"Use LevelGridView.ibegin(Entity) instead."

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

template<int dim, class GridImp , template< int, int, class > class EntityImp>
LevelIntersectionIterator Dune::Entity< 0, dim, GridImp, EntityImp >::ilevelend ( ) const
inline

Reference to an IntersectionIterator one past the last intersection.

Note
If the partitionType of the Entity is GhostEntity, this method might give you only one neighbor, which is the interior Entity the GhostEntity is connected to.
Deprecated:
This method is deprecated and will be removed after Dune 2.3. Use LevelGridView.iend(Entity) instead.
Deprecated:
"Use LevelGridView.iend(Entity) instead."

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

template<int dim, class GridImp , template< int, int, class > class EntityImp>
Implementation& Dune::Entity< 0, dim, GridImp, EntityImp >::impl ( )
inlineprotected

Return reference to the real implementation.

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

template<int dim, class GridImp , template< int, int, class > class EntityImp>
const Implementation& Dune::Entity< 0, dim, GridImp, EntityImp >::impl ( ) const
inlineprotected

Return const reference to the real implementation.

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

template<int dim, class GridImp , template< int, int, class > class EntityImp>
bool Dune::Entity< 0, dim, GridImp, EntityImp >::isLeaf ( ) const
inline

Returns true if the entity is contained in the leaf grid.

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

template<int dim, class GridImp , template< int, int, class > class EntityImp>
bool Dune::Entity< 0, dim, GridImp, EntityImp >::isNew ( ) const
inline

Returns true, if the entity has been created during the last call to adapt()

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

template<int dim, class GridImp , template< int, int, class > class EntityImp>
bool Dune::Entity< 0, dim, GridImp, EntityImp >::isRegular ( ) const
inline

Returns true if element is of regular type in red/green type refinement. In bisection or hanging node refinement this is always true.

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

template<int dim, class GridImp , template< int, int, class > class EntityImp>
int Dune::Entity< 0, dim, GridImp, EntityImp >::level ( ) const
inline

The level of this entity.

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

template<int dim, class GridImp , template< int, int, class > class EntityImp>
bool Dune::Entity< 0, dim, GridImp, EntityImp >::mightVanish ( ) const
inline

Returns true, if entity might disappear during the next call to adapt(). If the method returns false, the entity is guaranteed to still be present after adaptation.

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

template<int dim, class GridImp , template< int, int, class > class EntityImp>
Entity& Dune::Entity< 0, dim, GridImp, EntityImp >::operator= ( const Entity< 0, dim, GridImp, EntityImp > &  rhs)
inlineprotected

hide assignment operator

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

template<int dim, class GridImp , template< int, int, class > class EntityImp>
PartitionType Dune::Entity< 0, dim, GridImp, EntityImp >::partitionType ( ) const
inline

Partition type of this entity.

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

template<int dim, class GridImp , template< int, int, class > class EntityImp>
EntitySeed Dune::Entity< 0, dim, GridImp, EntityImp >::seed ( ) const
inline

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

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

template<int dim, class GridImp , template< int, int, class > class EntityImp>
template<int codim>
Codim< codim >::EntityPointer Dune::Entity< 0, dim, GridImp, EntityImp >::subEntity ( int  i) const
inline

Obtain a pointer to a subentity.

Template Parameters
codimcodimension of the desired subentity
Parameters
[in]inumber of the subentity (in generic numbering)
Returns
an EntityPointer to the specified subentity
Note
The subentities are numbered 0, ..., count< codim >-1

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

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

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

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

Friends And Related Function Documentation

template<int dim, class GridImp , template< int, int, class > class EntityImp>
template<class , PartitionIteratorType >
friend class DefaultLeafGridView
friend
template<int dim, class GridImp , template< int, int, class > class EntityImp>
template<class , PartitionIteratorType >
friend class DefaultLevelGridView
friend
template<int dim, class GridImp , template< int, int, class > class EntityImp>
template<class , class >
friend class Dune::EntityPointer
friend
template<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 dim, class GridImp , template< int, int, class > class EntityImp>
const int Dune::Entity< 0, dim, GridImp, EntityImp >::dimensionworld =GridImp::dimensionworld
static

Know the world dimension.

Deprecated:
"Use Geometry::coorddimension instead!"
template<int dim, class GridImp , template< int, int, class > class EntityImp>
Implementation Dune::Entity< 0, dim, GridImp, EntityImp >::realEntity
protected

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