dune-foamgrid  2.7-git
Public Types | Public Member Functions | Public Attributes | List of all members
Dune::FoamGridEntityImp< 2, 2, dimworld, ctype > Class Template Reference

Element specialization of FoamGridEntityImp for 2d grids. Element is a grid entity of topological codimension 0 and dimension dimgrid. More...

#include <dune/foamgrid/foamgrid/foamgridelements.hh>

Inheritance diagram for Dune::FoamGridEntityImp< 2, 2, dimworld, ctype >:
Inheritance graph

Public Types

enum  MarkState { DO_NOTHING , COARSEN , REFINE , IS_COARSENED }
 The different ways to mark an element for grid changes. More...
 

Public Member Functions

 FoamGridEntityImp (int level, unsigned int id)
 
int corners () const
 
GeometryType type () const
 
bool hasFather () const
 
bool mightVanish () const
 
bool isLeaf () const
 
bool isNew () const
 
unsigned int nSons () const
 
FieldVector< ctype, 2 > globalToLocal (const FieldVector< ctype, dimworld > &coord) const
 Compute local cordinates from global ones. More...
 
int subLevelIndex (int i, unsigned int codim) const
 Return level index of sub entity with codim = cc and local number i. More...
 
int subLeafIndex (int i, unsigned int codim) const
 Return leaf index of sub entity with codim = cc and local number i. More...
 
int level () const
 

Public Attributes

int refinementIndex_
 index of the refined element in the father More...
 
unsigned int nSons_
 
std::array< FoamGridEntityImp< dimgrid, dimgrid, dimworld, ctype > *, 4 > sons_
 
std::array< FoamGridEntityImp< dimgrid-1, dimgrid, dimworld, ctype > *, 3 > facet_
 
std::array< FoamGridEntityImp< 0, dimgrid, dimworld, ctype > *, 3 > vertex_
 
MarkState markState_
 Stores requests for refinement and coarsening. More...
 
bool isNew_
 This flag is set by adapt() if this element has been newly created. More...
 
FoamGridEntityImp< dimgrid, dimgrid,dimworld, ctype > * father_
 
std::shared_ptr< VirtualFunction< FieldVector< ctype, dimgrid >, FieldVector< ctype, dimworld > > > elementParametrization_
 The element parametrization. More...
 
bool coarseningBlocked_
 This flag is set by postGrow() if the element looses its right to coarsen because it contains a bifurcation facet without father. More...
 
int growthInsertionIndex_
 If this element was created in a growth step this will be the index of insertion So if this is the first element added to the growth queue by calling insertElement the index is 0 The index will be valid until postGrow is called. To all other times this shall be -1. More...
 
int level_
 level More...
 
unsigned int levelIndex_
 entity number More...
 
unsigned int leafIndex_
 
unsigned int id_
 
bool willVanish_
 Whether this entity will vanish due to coarsening. More...
 

Detailed Description

template<int dimworld, class ctype>
class Dune::FoamGridEntityImp< 2, 2, dimworld, ctype >

Element specialization of FoamGridEntityImp for 2d grids. Element is a grid entity of topological codimension 0 and dimension dimgrid.

Member Enumeration Documentation

◆ MarkState

template<int dimworld, class ctype >
enum Dune::FoamGridEntityImp< 2, 2, dimworld, ctype >::MarkState

The different ways to mark an element for grid changes.

Enumerator
DO_NOTHING 
COARSEN 
REFINE 
IS_COARSENED 

Constructor & Destructor Documentation

◆ FoamGridEntityImp()

template<int dimworld, class ctype >
Dune::FoamGridEntityImp< 2, 2, dimworld, ctype >::FoamGridEntityImp ( int  level,
unsigned int  id 
)
inline

Member Function Documentation

◆ corners()

template<int dimworld, class ctype >
int Dune::FoamGridEntityImp< 2, 2, dimworld, ctype >::corners ( ) const
inline

◆ globalToLocal()

template<int dimworld, class ctype >
FieldVector<ctype,2> Dune::FoamGridEntityImp< 2, 2, dimworld, ctype >::globalToLocal ( const FieldVector< ctype, dimworld > &  coord) const
inline

Compute local cordinates from global ones.

Parameters
coordThe global coordinates.
Returns
The corresponding local coordinates within the element.

◆ hasFather()

template<int dimworld, class ctype >
bool Dune::FoamGridEntityImp< 2, 2, dimworld, ctype >::hasFather ( ) const
inline

◆ isLeaf()

template<int dimworld, class ctype >
bool Dune::FoamGridEntityImp< 2, 2, dimworld, ctype >::isLeaf ( ) const
inline

◆ isNew()

template<int dimworld, class ctype >
bool Dune::FoamGridEntityImp< 2, 2, dimworld, ctype >::isNew ( ) const
inline

◆ level()

int Dune::FoamGridEntityBase::level ( ) const
inlineinherited

◆ mightVanish()

template<int dimworld, class ctype >
bool Dune::FoamGridEntityImp< 2, 2, dimworld, ctype >::mightVanish ( ) const
inline

◆ nSons()

template<int dimworld, class ctype >
unsigned int Dune::FoamGridEntityImp< 2, 2, dimworld, ctype >::nSons ( ) const
inline
Todo:
Implement me!

◆ subLeafIndex()

template<int dimworld, class ctype >
int Dune::FoamGridEntityImp< 2, 2, dimworld, ctype >::subLeafIndex ( int  i,
unsigned int  codim 
) const
inline

Return leaf index of sub entity with codim = cc and local number i.

◆ subLevelIndex()

template<int dimworld, class ctype >
int Dune::FoamGridEntityImp< 2, 2, dimworld, ctype >::subLevelIndex ( int  i,
unsigned int  codim 
) const
inline

Return level index of sub entity with codim = cc and local number i.

◆ type()

template<int dimworld, class ctype >
GeometryType Dune::FoamGridEntityImp< 2, 2, dimworld, ctype >::type ( ) const
inline

Member Data Documentation

◆ coarseningBlocked_

template<int dimworld, class ctype >
bool Dune::FoamGridEntityImp< 2, 2, dimworld, ctype >::coarseningBlocked_

This flag is set by postGrow() if the element looses its right to coarsen because it contains a bifurcation facet without father.

◆ elementParametrization_

template<int dimworld, class ctype >
std::shared_ptr<VirtualFunction<FieldVector<ctype, dimgrid>, FieldVector<ctype, dimworld> > > Dune::FoamGridEntityImp< 2, 2, dimworld, ctype >::elementParametrization_

The element parametrization.

◆ facet_

template<int dimworld, class ctype >
std::array<FoamGridEntityImp<dimgrid-1, dimgrid, dimworld, ctype>*, 3> Dune::FoamGridEntityImp< 2, 2, dimworld, ctype >::facet_

◆ father_

template<int dimworld, class ctype >
FoamGridEntityImp<dimgrid, dimgrid ,dimworld, ctype>* Dune::FoamGridEntityImp< 2, 2, dimworld, ctype >::father_

◆ growthInsertionIndex_

template<int dimworld, class ctype >
int Dune::FoamGridEntityImp< 2, 2, dimworld, ctype >::growthInsertionIndex_

If this element was created in a growth step this will be the index of insertion So if this is the first element added to the growth queue by calling insertElement the index is 0 The index will be valid until postGrow is called. To all other times this shall be -1.

◆ id_

unsigned int Dune::FoamGridEntityBase::id_
inherited

◆ isNew_

template<int dimworld, class ctype >
bool Dune::FoamGridEntityImp< 2, 2, dimworld, ctype >::isNew_

This flag is set by adapt() if this element has been newly created.

◆ leafIndex_

unsigned int Dune::FoamGridEntityBase::leafIndex_
inherited

◆ level_

int Dune::FoamGridEntityBase::level_
inherited

level

◆ levelIndex_

unsigned int Dune::FoamGridEntityBase::levelIndex_
inherited

entity number

◆ markState_

template<int dimworld, class ctype >
MarkState Dune::FoamGridEntityImp< 2, 2, dimworld, ctype >::markState_

Stores requests for refinement and coarsening.

◆ nSons_

template<int dimworld, class ctype >
unsigned int Dune::FoamGridEntityImp< 2, 2, dimworld, ctype >::nSons_

◆ refinementIndex_

template<int dimworld, class ctype >
int Dune::FoamGridEntityImp< 2, 2, dimworld, ctype >::refinementIndex_

index of the refined element in the father

For red refinement this is either the index of corner, that is also a corner in the father element, within the father or 3 if no corner is also a corner in the father.

◆ sons_

template<int dimworld, class ctype >
std::array<FoamGridEntityImp<dimgrid, dimgrid, dimworld, ctype>*, 4> Dune::FoamGridEntityImp< 2, 2, dimworld, ctype >::sons_

◆ vertex_

template<int dimworld, class ctype >
std::array<FoamGridEntityImp<0, dimgrid, dimworld, ctype>*, 3> Dune::FoamGridEntityImp< 2, 2, dimworld, ctype >::vertex_

◆ willVanish_

bool Dune::FoamGridEntityBase::willVanish_
inherited

Whether this entity will vanish due to coarsening.


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