3 #ifndef DUNE_GRID_ENTITY_HH
4 #define DUNE_GRID_ENTITY_HH
6 #include <dune/common/typetraits.hh>
55 template<
int cd,
int dim,
class Gr
idImp,
template<
int,
int,
class>
class EntityImp>
58 #if DUNE_GRID_EXPERIMENTAL_GRID_EXTENSIONS
64 GridImp::
dimension, GridImp::dimensionworld,
65 typename GridImp::ctype,
66 typename GridImp::GridFamily> ;
92 typedef typename GridImp::template Codim<cd>::Geometry
Geometry;
95 typedef typename GridImp::template Codim<cd>::EntitySeed
EntitySeed;
195 template<
int dim,
class Gr
idImp,
template<
int,
int,
class>
class EntityImp>
198 #if DUNE_GRID_EXPERIMENTAL_GRID_EXTENSIONS
204 GridImp::
dimension, GridImp::dimensionworld,
205 typename GridImp::ctype,
206 typename GridImp::GridFamily> ;
232 typedef typename GridImp::template Codim<0>::Geometry
Geometry;
235 typedef typename GridImp::template Codim<0>::EntitySeed
EntitySeed;
338 template<
int codim >
341 return realEntity.template subEntity< codim >( i );
358 DUNE_DEPRECATED_MSG("Use LeafGridView.ibegin(
Entity) instead.")
373 DUNE_DEPRECATED_MSG("Use LeafGridView.iend(
Entity) instead.")
392 DUNE_DEPRECATED_MSG("Use LevelGridView.ibegin(
Entity) instead.")
407 DUNE_DEPRECATED_MSG("Use LevelGridView.iend(
Entity) instead.")
551 template<
int cd,
int dim,
class Gr
idImp,
template<
int,
int,
class>
class EntityImp>
583 EntityImp<cd,dim,GridImp>& asImp ()
585 return static_cast<EntityImp<cd,dim,GridImp>&
>(*this);
587 const EntityImp<cd,dim,GridImp>& asImp ()
const
589 return static_cast<const EntityImp<cd,dim,GridImp>&
>(*this);
604 template<
int dim,
class Gr
idImp,
template<
int,
int,
class>
class EntityImp>
632 bool isRegular()
const {
return true; }
641 bool isNew ()
const {
return false; }
655 IntersectionIterator end = asImp().ilevelend();
656 for(IntersectionIterator it = asImp().ilevelbegin(); it != end; ++it)
658 if( it->boundary() )
return true;
664 IntersectionIterator end = asImp().ileafend();
665 for(IntersectionIterator it = asImp().ileafbegin(); it != end; ++it)
667 if( it->boundary() )
return true;
676 EntityImp<0,dim,GridImp>& asImp () {
return static_cast<EntityImp<0,dim,GridImp>&
>(*this); }
677 const EntityImp<0,dim,GridImp>& asImp ()
const {
return static_cast<const EntityImp<0,dim,GridImp>&
>(*this); }
682 #endif // DUNE_GRID_ENTITY_HH
Know your own codimension.
Definition: common/entity.hh:99
GridImp::template Codim< 0 >::EntitySeed EntitySeed
The corresponding entity seed (for storage of entities)
Definition: common/entity.hh:235
Definition: common/entity.hh:562
Definition: defaultgridview.hh:16
Grid::ctype ctype
define type used for coordinates in grid module
Definition: common/entity.hh:568
GridImp::HierarchicIterator HierarchicIterator
The HierarchicIterator type.
Definition: common/entity.hh:267
GridImp::template Codim< cd >::EntitySeed EntitySeed
The corresponding entity seed (for storage of entities)
Definition: common/entity.hh:95
LocalGeometry geometryInFather() const
Provides information how this element has been subdivided from its father element.
Definition: common/entity.hh:470
GridImp::template Codim< cd >::Geometry Geometry
The corresponding geometry type.
Definition: common/entity.hh:92
Wrapper class for entities.
Definition: common/entity.hh:56
GeometryType
Type representing VTK's entity geometry types.
Definition: common.hh:178
LeafIntersectionIterator ileafend() const
Reference to an IntersectionIterator one past the last intersection.
Definition: common/entity.hh:372
Implementation realEntity
Definition: common/entity.hh:221
Implementation & impl()
Return reference to the real implementation.
Definition: common/entity.hh:76
LevelIntersectionIterator ilevelbegin() const
Intra-level access to intersections with neighboring elements. A neighbor is an entity of codimension...
Definition: common/entity.hh:391
Entity(const Entity &rhs)
Definition: common/entity.hh:530
bool mightVanish() const
Returns true, if entity might disappear during the next call to adapt()
Definition: common/entity.hh:645
Entity(const EntityImp< 0, dim, GridImp > &e)
Copy constructor from EntityImp.
Definition: common/entity.hh:520
Wrapper class for pointers to entities.
Definition: common/entitypointer.hh:91
GridImp::LeafIntersectionIterator LeafIntersectionIterator
The Dune::IntersectionIterator type for the LeafGridView.
Definition: common/entity.hh:259
const Implementation & impl() const
Return const reference to the real implementation.
Definition: common/entity.hh:218
Wrapper class for geometries.
Definition: common/geometry.hh:101
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:443
GridImp::LevelIntersectionIterator LevelIntersectionIterator
The Dune::IntersectionIterator type for the LevelGridView.
Definition: common/entity.hh:264
const Implementation & impl() const
Return const reference to the real implementation.
Definition: common/entity.hh:78
PartitionType partitionType() const
Partition type of this entity.
Definition: common/entity.hh:128
LevelIntersectionIterator ilevelend() const
Reference to an IntersectionIterator one past the last intersection.
Definition: common/entity.hh:406
HierarchicIterator hend(int maxlevel) const
Returns iterator to one past the last son element.
Definition: common/entity.hh:495
bool isNew() const
Returns true, if the entity has been created during the last call to adapt()
Definition: common/entity.hh:641
Dimensionality of the reference element of the entity.
Definition: common/entity.hh:107
Grid::template Codim< cd >::EntityPointer EntityPointer
The corresponding entity seed (for storage of entities)
Definition: common/entity.hh:574
Definition: defaultgridview.hh:19
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:244
GeometryType type() const
Return the name of the reference element. The type can be used to access the Dune::ReferenceElement.
Definition: common/entity.hh:579
Codim< codim >::EntityPointer subEntity(int i) const
Obtain a pointer to a subentity.
Definition: common/entity.hh:339
int count() const
Number of subentities with codimension cc.
Definition: common/entity.hh:326
Default Implementations for EntityImp.
Definition: common/entity.hh:552
GeometryType type() const
Return the name of the reference element. The type can be used to access the Dune::ReferenceElement.
Definition: common/entity.hh:307
Definition: common/entity.hh:556
PartitionType partitionType() const
Partition type of this entity.
Definition: common/entity.hh:299
Entity(const EntityImp< cd, dim, GridImp > &e)
Copy constructor from EntityImp.
Definition: common/entity.hh:162
bool mightVanish() const
Returns true, if entity might disappear during the next call to adapt(). If the method returns false...
Definition: common/entity.hh:508
PartitionType
Attributes used in the generic overlap model.
Definition: gridenums.hh:24
GridImp::ctype ctype
coordinate type of the Grid
Definition: common/entity.hh:113
EntityImp< cd, dim, GridImp > Implementation
Definition: common/entity.hh:73
Geometry geometry() const
obtain geometric realization of the entity
Definition: common/entity.hh:142
int level() const
The level of this entity.
Definition: common/entity.hh:125
bool hasFather() const
Return true if entity has a father entity which can be accessed using the father() method...
Definition: common/entity.hh:429
static const int dimensionworld
Know the dimension of world.
Definition: common/entity.hh:110
Entity & operator=(const Entity &rhs)
Definition: common/entity.hh:174
Mesh entities of codimension 0 ("elements") allow to visit all intersections with "neighboring" eleme...
Definition: common/grid.hh:358
Definition: common/entity.hh:559
Wrapper and interface classe for a static iterator (EntityPointer)
bool hasBoundaryIntersections() const
Returns true, if entity has intersections with boundary, this implementation uses the Level- and Leaf...
Definition: common/entity.hh:651
GridImp::template Codim< 0 >::EntityPointer EntityPointer
The codim==0 EntityPointer type.
Definition: common/entity.hh:254
bool isNew() const
Returns true, if the entity has been created during the last call to adapt()
Definition: common/entity.hh:502
EntitySeed seed() const
Return the entity seed which contains sufficient information to generate the entity again and uses as...
Definition: common/entity.hh:312
Implementation realEntity
Definition: common/entity.hh:81
Different resources needed by all grid implementations.
LeafIntersectionIterator ileafbegin() const
Access to intersections with neighboring leaf elements. A neighbor is an entity of codimension 0 whic...
Definition: common/entity.hh:357
Geometry geometry() const
obtain geometric realization of the entity
Definition: common/entity.hh:302
Definition: common/geometry.hh:24
Entity(const Entity &rhs)
Definition: common/entity.hh:172
static const int dimensionworld
know your own dimension of world
Definition: common/entity.hh:565
bool isLeaf() const
Returns true if the entity is contained in the leaf grid.
Definition: common/entity.hh:435
Grid::template Codim< cd >::EntitySeed EntitySeed
The corresponding entity seed (for storage of entities)
Definition: common/entity.hh:571
bool hasBoundaryIntersections() const
Returns true, if entity has intersections with boundary.
Definition: common/entity.hh:517
EntityPointer father() const
Inter-level access to father entity on the next-coarser grid. The given entity resulted directly from...
Definition: common/entity.hh:421
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
GridImp::template Codim< cd >::EntityPointer EntityPointer
Definition: common/entity.hh:250
GeometryType type() const
Return the name of the reference element. The type can be used to access the Dune::ReferenceElement.
Definition: common/entity.hh:637
HierarchicIterator hbegin(int maxlevel) const
Inter-level access to elements that resulted from (recursive) subdivision of this element...
Definition: common/entity.hh:483
GridImp::template Codim< 0 >::Geometry Geometry
The geometry type of this entity.
Definition: common/entity.hh:232
Know the grid dimension.
Definition: common/entity.hh:103