#include <spacePreBuilder.hh>
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::IndexRange & | index (uint dim, const concepts::Connector2 &cntr, uint i=0, uint spcNo=0) const |
virtual concepts::IndexRange & | setIndex (uint &firstIdx, uint noIdx, uint dim, const concepts::Connector &cntr, uint i=0, uint spcNo=0) |
virtual concepts::Set< concepts::IndexRange > | indices (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::Mesh2 & | mesh () const |
Returns mesh. | |
Protected Member Functions | |
virtual std::ostream & | info (std::ostream &os) const |
Returns information in an output stream. | |
Protected Attributes | |
concepts::Mesh2 & | msh_ |
Mesh. | |
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).
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
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().
Definition at line 167 of file spacePreBuilder.hh.
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.
|
inlinevirtual |
Destructor.
Definition at line 177 of file spacePreBuilder.hh.
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.
|
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 > >.
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.
|
inline |
Returns set of all cells.
Definition at line 313 of file spacePreBuilder.hh.
|
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.
|
inline |
Returns set of 'member of space' cells.
Definition at line 311 of file spacePreBuilder.hh.
void hp2D::hpFull::clearAllIndices | ( | uint | spcNo = 0 | ) |
Resets all to spcNo
belonging indices, which were set with setIndex().
|
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.
|
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.
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.
dim | dimension of entity of dof, e.g. 0 for node |
i | number of the entity in cell, e.g. i.th node |
spcNo | number for distinguish between global indices on same topological entity |
|
virtual |
Returns all indices of degrees of freedom of one dimension dim
which belong to the cell cntr
. Returns it only, if ...
spcNo | number for distinguish between global indices on same topological entity |
Implements hp2D::SpacePreBuilder.
|
protectedvirtual |
Returns information in an output stream.
Reimplemented from concepts::SpacePreBuilder.
|
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).
Implements hp2D::SpacePreBuilder.
|
inlinevirtualinherited |
Returns mesh.
Implements concepts::SpacePreBuilder.
Definition at line 45 of file spacePreBuilder.hh.
|
inline |
Number of cells on the finest level.
Definition at line 301 of file spacePreBuilder.hh.
|
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.
|
virtual |
Rebuilds the potential degrees of freedom. Calls at beginning rebuildMesh()
.
Implements concepts::SpacePreBuilder.
|
virtual |
Rebuilds the mesh due to adjustments, set polynomial degrees in inner degrees of freedom.
Implements concepts::SpacePreBuilder.
|
virtual |
Sets the index range of the dof inside cell cntr
and returns it. Throws exception if there is not such a dof.
firstIdx | first index in range |
noIdx | number of dof on this entity |
dim | dimension of entity of dof, e.g. 0 for node |
cntr | topological cell on arbitrary level |
i | number of the entity in cell, e.g. i.th node (not used for inner degrees of freedom) |
spcNo | number for distinguish between global indices on same topological entity |
Implements hp2D::SpacePreBuilder.
|
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.
p | polynomial degree to set |
donts | set of vertex attributes on which corressponding cells no p refinement should be setted |
void hp2D::hpFull::storeMatlab | ( | const std::string | name | ) |
Stores the mesh and degrees of freedoms in a matlab file, ".m" ending is needed
|
virtual |
Returns, if the i
th vertex of cell cntr
has a degree of freedom
Implements hp2D::SpacePreBuilder.
|
protectedinherited |
Mesh.
Definition at line 86 of file spacePreBuilder.hh.