dune-grid  2.3.0
Classes | Public Types | Public Member Functions | Static Public Attributes | Protected Attributes | Friends | List of all members
Dune::SEntity< 0, dim, GridImp > Class Template Reference

#include <dune/grid/sgrid.hh>

Inheritance diagram for Dune::SEntity< 0, dim, GridImp >:
Dune::SEntityBase< 0, dim, GridImp, SEntity > Dune::EntityDefaultImplementation< codim, dim, GridImp, SEntity >

Classes

struct  Codim
 

Public Types

typedef GridImp::ctype ctype
 
typedef GridImp::template
Codim< 0 >::Geometry 
Geometry
 
typedef GridImp::template
Codim< 0 >::LocalGeometry 
LocalGeometry
 
typedef GridImp::template
Codim< 0 >::EntityPointer 
EntityPointer
 
typedef
GridImp::LeafIntersectionIterator 
IntersectionIterator
 
typedef GridImp::HierarchicIterator HierarchicIterator
 
typedef
GridImp::PersistentIndexType 
PersistentIndexType
 
enum  
 know your own codimension More...
 
enum  
 Dimension of the grid. More...
 
enum  
 Know dimension of the entity. More...
 
typedef GridImp::template
Codim< cd >::EntitySeed 
EntitySeed
 The corresponding entity seed (for storage of entities) More...
 

Public Member Functions

template<int cc>
int count () const
 
template<int cc>
Codim< cc >::EntityPointer subEntity (int i) const
 
int subCompressedIndex (int codim, int i) const
 subentity compressed index More...
 
int subCompressedLeafIndex (int codim, int i) const
 
PersistentIndexType subPersistentIndex (int codim, int i) const
 subentity persistent index More...
 
IntersectionIterator ibegin () const
 
IntersectionIterator ileafbegin () const
 
IntersectionIterator ilevelbegin () const
 
IntersectionIterator iend () const
 Reference to one past the last intersection. More...
 
IntersectionIterator ileafend () const
 
IntersectionIterator ilevelend () const
 
EntityPointer father () const
 Inter-level access to father element on coarser grid. More...
 
bool hasFather () const
 returns true if father entity exists More...
 
bool isLeaf () const
 return true if the entity is leaf More...
 
LocalGeometry geometryInFather () const
 Location of this element relative to the reference element element of the father. More...
 
HierarchicIterator hbegin (int maxLevel) const
 Inter-level access to son elements on higher levels<=maxLevel. More...
 
HierarchicIterator hend (int maxLevel) const
 Returns iterator to one past the last son. More...
 
 SEntity (GridImp *_grid, int _l, int _index)
 constructor More...
 
 SEntity (const SEntity &other)
 
void make (GridImp *_grid, int _l, int _id)
 Reinitialization. More...
 
void make (int _l, int _id)
 Reinitialization. More...
 
int level () const
 level of this element More...
 
int globalIndex () const
 global index is calculated from the index and grid size More...
 
SEntitySeed< codim, GridImp > seed () const
 Return the entity seed which contains sufficient information to generate the entity again and uses as little memory as possible. More...
 
GeometryType type () const
 return the element type identifier More...
 
Geometry geometry () const
 geometry of this entity More...
 
PartitionType partitionType () const
 
void makegeometry () const
 geometry of this entity More...
 
PersistentIndexType persistentIndex () const
 globally unique, persistent index More...
 
int compressedIndex () const
 consecutive, codim-wise, level-wise index More...
 
int compressedLeafIndex () const
 consecutive, codim-wise, level-wise index More...
 

Static Public Attributes

static const int dimensionworld
 know your own dimension of world More...
 

Protected Attributes

GridImp * grid
 grid containes mapper, geometry, etc. More...
 
int l
 level where element is on More...
 
int index
 my consecutive index More...
 
array< int, dim > z
 my coordinate, number of even components = codim More...
 
GeometryImpl geo
 geometry, is only built on demand More...
 
bool builtgeometry
 true if geometry has been constructed More...
 

Friends

class SEntityPointer< 0, GridImp >
 
class SIntersectionIterator< GridImp >
 
class SHierarchicIterator< GridImp >
 make HierarchicIterator a friend More...
 

Detailed Description

template<int dim, class GridImp>
class Dune::SEntity< 0, dim, GridImp >

A Grid is a container of grid entities. An entity is parametrized by the codimension. An entity of codimension c in dimension d is a d-c dimensional object.

Entities of codimension 0 ("elements") are defined through template specialization. Note that this specialization has an extended interface compared to the general case

Entities of codimension 0 allow to visit all neighbors, where a neighbor is an entity of codimension 0 which has a common entity of codimension 1 with the entity. These neighbors are accessed via an iterator. This allows the implementation of non-matching meshes. The number of neigbors may be different from the number of faces/edges of an element! A Grid is a container of grid entities. An entity is parametrized by the codimension. An entity of codimension c in dimension d is a d-c dimensional object.

Entities of codimension=0 ("Cells") are defined through template specialization. Note that this specialization has an extended interface compared to the general case

Member Typedef Documentation

template<int dim, class GridImp >
typedef GridImp::ctype Dune::SEntity< 0, dim, GridImp >::ctype
template<int dim, class GridImp >
typedef GridImp::template Codim<0>::EntityPointer Dune::SEntity< 0, dim, GridImp >::EntityPointer
typedef GridImp::template Codim<cd>::EntitySeed Dune::EntityDefaultImplementation< cd, dim, GridImp, SEntity >::EntitySeed
inherited

The corresponding entity seed (for storage of entities)

template<int dim, class GridImp >
typedef GridImp::template Codim<0>::Geometry Dune::SEntity< 0, dim, GridImp >::Geometry
template<int dim, class GridImp >
typedef GridImp::HierarchicIterator Dune::SEntity< 0, dim, GridImp >::HierarchicIterator
template<int dim, class GridImp >
typedef GridImp::LeafIntersectionIterator Dune::SEntity< 0, dim, GridImp >::IntersectionIterator
template<int dim, class GridImp >
typedef GridImp::template Codim<0>::LocalGeometry Dune::SEntity< 0, dim, GridImp >::LocalGeometry
template<int dim, class GridImp >
typedef GridImp::PersistentIndexType Dune::SEntity< 0, dim, GridImp >::PersistentIndexType

Member Enumeration Documentation

anonymous enum
inherited

know your own codimension

anonymous enum
inherited

Dimension of the grid.

anonymous enum
inherited

Know dimension of the entity.

Constructor & Destructor Documentation

template<int dim, class GridImp >
Dune::SEntity< 0, dim, GridImp >::SEntity ( GridImp *  _grid,
int  _l,
int  _index 
)
inline

constructor

template<int dim, class GridImp >
Dune::SEntity< 0, dim, GridImp >::SEntity ( const SEntity< 0, dim, GridImp > &  other)
inline

Member Function Documentation

int Dune::SEntityBase< codim, dim, GridImp, SEntity >::compressedIndex ( ) const
inlineinherited

consecutive, codim-wise, level-wise index

int Dune::SEntityBase< codim, dim, GridImp, SEntity >::compressedLeafIndex ( ) const
inlineinherited

consecutive, codim-wise, level-wise index

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

Intra-element access to entities of codimension cc > codim. Return number of entities with codimension cc.

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

Inter-level access to father element on coarser grid.

Assumes that meshes are nested.

Geometry Dune::SEntityBase< codim, dim, GridImp, SEntity >::geometry ( ) const
inlineinherited

geometry of this entity

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

Location of this element relative to the reference element element of the father.

This is sufficient to interpolate all dofs in conforming case. Nonconforming may require access to neighbors of father and computations with local coordinates. On the fly case is somewhat inefficient since dofs are visited several times. If we store interpolation matrices, this is tolerable. We assume that on-the-fly implementation of numerical algorithms is only done for simple discretizations. Assumes that meshes are nested.

int Dune::SEntityBase< codim, dim, GridImp, SEntity >::globalIndex ( ) const
inherited

global index is calculated from the index and grid size

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

returns true if father entity exists

References Dune::SEntityBase< codim, dim, GridImp, SEntity >::level().

template<int dim, class GridImp >
HierarchicIterator Dune::SEntity< 0, dim, GridImp >::hbegin ( int  maxLevel) const

Inter-level access to son elements on higher levels<=maxLevel.

This is provided for sparsely stored nested unstructured meshes. Returns iterator to first son.

template<int dim, class GridImp >
HierarchicIterator Dune::SEntity< 0, dim, GridImp >::hend ( int  maxLevel) const

Returns iterator to one past the last son.

template<int dim, class GridImp >
IntersectionIterator Dune::SEntity< 0, dim, GridImp >::ibegin ( ) const

Intra-level access to intersections with neighboring elements. A neighbor is an entity of codimension 0 which has an entity of codimension 1 in commen with this entity. Access to neighbors is provided using iterators. This allows meshes to be nonmatching. Returns iterator referencing the first neighbor.

template<int dim, class GridImp >
IntersectionIterator Dune::SEntity< 0, dim, GridImp >::iend ( ) const

Reference to one past the last intersection.

template<int dim, class GridImp >
IntersectionIterator Dune::SEntity< 0, dim, GridImp >::ileafbegin ( ) const
template<int dim, class GridImp >
IntersectionIterator Dune::SEntity< 0, dim, GridImp >::ileafend ( ) const
template<int dim, class GridImp >
IntersectionIterator Dune::SEntity< 0, dim, GridImp >::ilevelbegin ( ) const
template<int dim, class GridImp >
IntersectionIterator Dune::SEntity< 0, dim, GridImp >::ilevelend ( ) const
template<int dim, class GridImp >
bool Dune::SEntity< 0, dim, GridImp >::isLeaf ( ) const
inline
int Dune::SEntityBase< codim, dim, GridImp, SEntity >::level ( ) const
inlineinherited

level of this element

template<int dim, class GridImp >
void Dune::SEntity< 0, dim, GridImp >::make ( GridImp *  _grid,
int  _l,
int  _id 
)
inline
template<int dim, class GridImp >
void Dune::SEntity< 0, dim, GridImp >::make ( int  _l,
int  _id 
)
inline
void Dune::SEntityBase< codim, dim, GridImp, SEntity >::makegeometry ( ) const
inherited

geometry of this entity

PartitionType Dune::SEntityBase< codim, dim, GridImp, SEntity >::partitionType ( ) const
inlineinherited
PersistentIndexType Dune::SEntityBase< codim, dim, GridImp, SEntity >::persistentIndex ( ) const
inlineinherited

globally unique, persistent index

SEntitySeed<codim, GridImp> Dune::SEntityBase< codim, dim, GridImp, SEntity >::seed ( ) const
inlineinherited

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

template<int dim, class GridImp >
int Dune::SEntity< 0, dim, GridImp >::subCompressedIndex ( int  codim,
int  i 
) const
inline
template<int dim, class GridImp >
int Dune::SEntity< 0, dim, GridImp >::subCompressedLeafIndex ( int  codim,
int  i 
) const
inline
template<int dim, class GridImp >
template<int cc>
Codim<cc>::EntityPointer Dune::SEntity< 0, dim, GridImp >::subEntity ( int  i) const

Provide access to mesh entity i of given codimension. Entities are numbered 0 ... count<cc>()-1

template<int dim, class GridImp >
PersistentIndexType Dune::SEntity< 0, dim, GridImp >::subPersistentIndex ( int  codim,
int  i 
) const
inline
GeometryType Dune::SEntityBase< codim, dim, GridImp, SEntity >::type ( ) const
inlineinherited

return the element type identifier

Friends And Related Function Documentation

template<int dim, class GridImp >
friend class SEntityPointer< 0, GridImp >
friend
template<int dim, class GridImp >
friend class SHierarchicIterator< GridImp >
friend

make HierarchicIterator a friend

template<int dim, class GridImp >
friend class SIntersectionIterator< GridImp >
friend

Member Data Documentation

bool Dune::SEntityBase< codim, dim, GridImp, SEntity >::builtgeometry
mutableprotectedinherited

true if geometry has been constructed

const int Dune::EntityDefaultImplementation< cd, dim, GridImp, SEntity >::dimensionworld
staticinherited

know your own dimension of world

Deprecated:
"Use Geometry::coorddimension instead!"
GeometryImpl Dune::SEntityBase< codim, dim, GridImp, SEntity >::geo
mutableprotectedinherited

geometry, is only built on demand

GridImp* Dune::SEntityBase< codim, dim, GridImp, SEntity >::grid
protectedinherited

grid containes mapper, geometry, etc.

int Dune::SEntityBase< codim, dim, GridImp, SEntity >::index
protectedinherited

my consecutive index

int Dune::SEntityBase< codim, dim, GridImp, SEntity >::l
protectedinherited

level where element is on

array<int,dim> Dune::SEntityBase< codim, dim, GridImp, SEntity >::z
protectedinherited

my coordinate, number of even components = codim


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