Class documentation of Concepts

Loading...
Searching...
No Matches

#include <spacePreBuilder.hh>

Inheritance diagram for hp2D::hpFull:
hp2D::SpacePreBuilder concepts::Adaptivity< concepts::Connector, concepts::AdaptiveAdjustP< 2 > > concepts::SpacePreBuilder concepts::OutputOperator

Public Member Functions

 hpFull (concepts::Mesh2 &msh, uint l=0, uint p=1, bool build=false)
 Constructor.
 
 hpFull (const hpFull &preBuild)
 
virtual ~hpFull ()
 Destructor.
 
void setPolyEdgeRule (const PolyEdgeRule &rule)
 
virtual void adjust (const concepts::Connector &cell, const concepts::AdaptiveAdjustP< 2 > &a)
 
void adjust (const uint nrCell, const concepts::AdaptiveAdjustP< 2 > &a)
 
void adjust (const concepts::AdaptiveAdjustP< 2 > &a)
 
uint available () const
 
virtual void rebuildMesh ()
 
virtual void rebuildDof ()
 
virtual bool vtxDof (const concepts::Connector2 &cntr, uint i) const
 
virtual ushort edgeDof (const concepts::Connector2 &cntr, uint i) const
 
virtual const ushort * innerDof (const concepts::Connector2 &cntr) const
 
virtual const ushort * pMax (const concepts::Connector2 &cntr, ushort *p=0) const
 
virtual ushort edgeP (const concepts::Connector2 &cntr, uint i) const
 
const concepts::IndexRangeindex (uint dim, const concepts::Connector2 &cntr, uint i=0, uint spcNo=0) const
 
virtual concepts::IndexRangesetIndex (uint &firstIdx, uint noIdx, uint dim, const concepts::Connector &cntr, uint i=0, uint spcNo=0)
 
virtual concepts::Set< concepts::IndexRangeindices (uint dim, const concepts::Connector &cntr, uint spcNo=0) const
 
virtual void setP (uint p, const concepts::Set< uint > &donts)
 
void clearAllIndices (uint spcNo=0)
 
uint ncells ()
 Number of cells on the finest level.
 
bool isHangEdge (const concepts::Connector1 &cntr) const
 Returns true, if edge is hanging.
 
void storeMatlab (const std::string name)
 
concepts::Set< concepts::Cell2 * > cells () const
 Returns set of 'member of space' cells.
 
std::set< concepts::Cell2 * > allCells () const
 Returns set of all cells.
 
virtual concepts::Mesh2mesh () const
 Returns mesh.
 

Protected Member Functions

virtual std::ostream & info (std::ostream &os) const
 Returns information in an output stream.
 

Protected Attributes

concepts::Mesh2msh_
 Mesh.
 

Detailed Description

Helper class for building 2D hp-FEM spaces (space pre builder).

Holds potential degrees of freedom (dof), that are nodes, edges and cells and the latter with maximal polynomial degrees (P > 0).

Adaptivity
You can adaptively refine this space pre builder by using adjust() on some cells to refine them or increase their polynomial degree. Please note that these extensions can be locally varying (ie. non-uniform) and anisotropic.

The adjustment orders are collected and the dof are rebuild when calling rebuildDof().

The degrees of freedoms are distributed to the nodes, edges and cells to have small supports. Hanging nodes and hanging edges don't get dof. The space pre builders fullfills the minimum rule, the maximal polynomial degree (P) on a edge is never larger than P of the inner degrees of freedom (in the direction of the edge) in one of the adjacent cells.

-------— The numbers are maximal vertical polynomial degree | 1 | | for inner dof. The maximal polynomial degree of the --— 2 | long vertical edge in the middle is the minimum, so

| 2 | | P = 1.

On edges we have to distinguish between the maximal polynomial degree of dof, if there are, and the maximal polynomial degree to represent edge dof of larger support. The latter can be the case also for hanging edges.

------------— The numbers are maximal vertical polynomial | 2 | | degree for inner dof. The large vertical edge ------— 2 | in the middle has P = 2 and the vertical edge | 1 | 2 | | between the cells with 1 and 2 has P = 1 ------------— (minimum rule). All the cells are in the support of the basis functions belonging to the large vertical edge. So also the small cell with 1 needs vertical P = 2 to represent the latter basis functions, however there is no dof with P = 2 on the small vertical edge between 1 and 2.

To get information about the dof use vtxDof(), edgeDof() and innerDof().

To get the maximal polynomial degree for representing all basis functions use pMax().

Author
Kersten Schmidt, 2005

Definition at line 167 of file spacePreBuilder.hh.

Constructor & Destructor Documentation

◆ hpFull()

hp2D::hpFull::hpFull ( const hpFull preBuild)

Copy constructor, the copy contains the same mesh, all information about adjustments and degrees of freedoms are copied. So h-refinement will be achieved in both pre builders.

◆ ~hpFull()

virtual hp2D::hpFull::~hpFull ( )
inlinevirtual

Destructor.

Definition at line 177 of file spacePreBuilder.hh.

Member Function Documentation

◆ adjust() [1/3]

void hp2D::hpFull::adjust ( const concepts::AdaptiveAdjustP< 2 > &  a)

Adjusts the mesh and polynomial degrees in the next rebuild step for all 'member of space' cell. Previous adjustment orders are overwritten.

◆ adjust() [2/3]

virtual void hp2D::hpFull::adjust ( const concepts::Connector cell,
const concepts::AdaptiveAdjustP< 2 > &  a 
)
virtual

Adjusts the mesh and polynomial degrees in the next rebuild step for this cell. Previous adjustment orders are overwritten.

Implements concepts::Adaptivity< concepts::Connector, concepts::AdaptiveAdjustP< 2 > >.

◆ adjust() [3/3]

void hp2D::hpFull::adjust ( const uint  nrCell,
const concepts::AdaptiveAdjustP< 2 > &  a 
)

Adjusts the mesh and polynomial degrees in the next rebuild step for the nrCell th 'member of space' cell. Previous adjustment orders are overwritten.

◆ allCells()

std::set< concepts::Cell2 * > hp2D::hpFull::allCells ( ) const
inline

Returns set of all cells.

Definition at line 313 of file spacePreBuilder.hh.

◆ available()

uint hp2D::hpFull::available ( ) const
inline

Returns 0 if the potential degrees of freedom has to be rebuilt with rebuildDof(), otherwise the number of the build. This number is useful for a space to decide, wether its available and valid, if the rebuildDof() is called directly and not through space methods.

Definition at line 203 of file spacePreBuilder.hh.

◆ cells()

concepts::Set< concepts::Cell2 * > hp2D::hpFull::cells ( ) const
inline

Returns set of 'member of space' cells.

Definition at line 311 of file spacePreBuilder.hh.

◆ clearAllIndices()

void hp2D::hpFull::clearAllIndices ( uint  spcNo = 0)

Resets all to spcNo belonging indices, which were set with setIndex().

◆ edgeDof()

virtual ushort hp2D::hpFull::edgeDof ( const concepts::Connector2 cntr,
uint  i 
) const
virtual

Returns the maximal polynomial degree of the degrees of freedom on edge i in the cell cntr. Return value 0 for no degree of freedom.

Implements hp2D::SpacePreBuilder.

◆ edgeP()

virtual ushort hp2D::hpFull::edgeP ( const concepts::Connector2 cntr,
uint  i 
) const
virtual

Returns the maximal polynomial degree of an edge i in cell cntr, if edge has degrees of freedom or is hanging. Return value 0 in other case.

Implements hp2D::SpacePreBuilder.

◆ index()

const concepts::IndexRange & hp2D::hpFull::index ( uint  dim,
const concepts::Connector2 cntr,
uint  i = 0,
uint  spcNo = 0 
) const

Returns the index range of the dof inside cell cntr. Throws exception if there is not such a dof.

Parameters
dimdimension of entity of dof, e.g. 0 for node
inumber of the entity in cell, e.g. i.th node
spcNonumber for distinguish between global indices on same topological entity

◆ indices()

virtual concepts::Set< concepts::IndexRange > hp2D::hpFull::indices ( uint  dim,
const concepts::Connector cntr,
uint  spcNo = 0 
) const
virtual

Returns all indices of degrees of freedom of one dimension dim which belong to the cell cntr. Returns it only, if ...

Parameters
spcNonumber for distinguish between global indices on same topological entity

Implements hp2D::SpacePreBuilder.

◆ info()

virtual std::ostream & hp2D::hpFull::info ( std::ostream &  os) const
protectedvirtual

Returns information in an output stream.

Reimplemented from concepts::SpacePreBuilder.

◆ innerDof()

virtual const ushort * hp2D::hpFull::innerDof ( const concepts::Connector2 cntr) const
virtual

Returns a pointer to the maximal polynomial degrees of the inner degree of freedom in the cell quad. Returns value 0 if there are no inner dof (i.e. cell has no children).

Returns
pointer to array with two elements.

Implements hp2D::SpacePreBuilder.

◆ mesh()

virtual concepts::Mesh2 & hp2D::SpacePreBuilder::mesh ( ) const
inlinevirtualinherited

Returns mesh.

Implements concepts::SpacePreBuilder.

Definition at line 45 of file spacePreBuilder.hh.

◆ ncells()

uint hp2D::hpFull::ncells ( )
inline

Number of cells on the finest level.

Definition at line 301 of file spacePreBuilder.hh.

◆ pMax()

virtual const ushort * hp2D::hpFull::pMax ( const concepts::Connector2 cntr,
ushort *  p = 0 
) const
virtual

Returns a pointer to the maximal polynomial degrees in the cell quad to represent all those basis functions whose support contains quad. Returns value 0, if cell is not in the support of any basis function, e.g. it is too large.

  If \c p is given, the maximum polynomial degree is set to the
  maximum of its previous value and \c p and \c p is takes this
  value as well.

Implements hp2D::SpacePreBuilder.

◆ rebuildDof()

virtual void hp2D::hpFull::rebuildDof ( )
virtual

Rebuilds the potential degrees of freedom. Calls at beginning rebuildMesh().

Implements concepts::SpacePreBuilder.

◆ rebuildMesh()

virtual void hp2D::hpFull::rebuildMesh ( )
virtual

Rebuilds the mesh due to adjustments, set polynomial degrees in inner degrees of freedom.

Implements concepts::SpacePreBuilder.

◆ setIndex()

virtual concepts::IndexRange & hp2D::hpFull::setIndex ( uint &  firstIdx,
uint  noIdx,
uint  dim,
const concepts::Connector cntr,
uint  i = 0,
uint  spcNo = 0 
)
virtual

Sets the index range of the dof inside cell cntr and returns it. Throws exception if there is not such a dof.

Parameters
firstIdxfirst index in range
noIdxnumber of dof on this entity
dimdimension of entity of dof, e.g. 0 for node
cntrtopological cell on arbitrary level
inumber of the entity in cell, e.g. i.th node (not used for inner degrees of freedom)
spcNonumber for distinguish between global indices on same topological entity

Implements hp2D::SpacePreBuilder.

◆ setP()

virtual void hp2D::hpFull::setP ( uint  p,
const concepts::Set< uint > &  donts 
)
virtual

Adjusts all cells with polynomial degree equal to p, which dont have a vertex with attribute equal to one given in the donts set.

applies for given hprefinement on particular cells, which have the same attribute as other cells, s.t. a p-refinement on those cells does not apply.

Parameters
ppolynomial degree to set
dontsset of vertex attributes on which corressponding cells no p refinement should be setted

◆ storeMatlab()

void hp2D::hpFull::storeMatlab ( const std::string  name)

Stores the mesh and degrees of freedoms in a matlab file, ".m" ending is needed

◆ vtxDof()

virtual bool hp2D::hpFull::vtxDof ( const concepts::Connector2 cntr,
uint  i 
) const
virtual

Returns, if the i th vertex of cell cntr has a degree of freedom

Implements hp2D::SpacePreBuilder.

Member Data Documentation

◆ msh_

concepts::Mesh2& hp2D::SpacePreBuilder::msh_
protectedinherited

Mesh.

Definition at line 86 of file spacePreBuilder.hh.


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