hp-adaptive space with 2D elements. More...
#include <hpAdaptiveSpace.hh>


Public Types | |
| typedef concepts::Scan < hp2D::Element< F > > | Scan |
| typedef Scan< ElementWithCell < F > > | Scanner |
| typedef F | t_type |
Public Member Functions | |
| virtual void | adjust (const concepts::Element< F > &elm, const concepts::AdaptiveAdjustP< 2 > &a) |
| Adjusts the space in the next rebuild step for this element. | |
| std::pair< bool, uint > | available () const |
| Returns 0 if the space has to be rebuilt with rebuild(), otherwise the number of the build. | |
| virtual uint | dim () const |
| Returns the dimension of the space. | |
| uint | dim () |
| concepts::SubspaceHelper< F, SpacePreBuilder > & | helper () |
| hpAdaptiveSpace (hpFull &prebuild, concepts::BoundaryConditions *bc=0, concepts::CellConditions *cc=0, uint spcNo=0, uint *offset=0, uint *idx=0) | |
| Constructor for using same mesh and distribution of degrees of freedom object as another space. | |
| hpAdaptiveSpace (concepts::Mesh2 &msh, uint l, uint p, concepts::BoundaryConditions *bc=0, concepts::CellConditions *cc=0) | |
| Constructor. | |
| hpAdaptiveSpace (const hpAdaptiveSpace &spc) | |
| Copy constructor. | |
| virtual uint & | lastIdx () |
| Returns last global index of the space. | |
| virtual const uint & | lastIdx () const |
| virtual uint | nelm () const |
| Returns the number of elements in the space. | |
| uint | nelm () |
| virtual uint | offset () const |
| Returns the offset. | |
| hpFull & | prebuild () |
| hpFull & | prebuild () const |
| void | rebuild (bool sameIndices=false) |
| Rebuilds the mesh and the elements due to adjustment orders. | |
| virtual void | recomputeShapefunctions ()=0 |
| Recompute shape functions, e.g. | |
| virtual Scan * | scan () const |
| Returns a scanner to iterate over the elements of the space. | |
| Scan * | scan () |
| virtual | ~hpAdaptiveSpace () |
Protected Member Functions | |
| virtual concepts::TColumn< F > * | applySmatrices_ (const concepts::Element< F > &elm, uint i, const concepts::TColumn< F > *T0, const concepts::TColumn< F > *T1)=0 |
Apply i -th S matrix to T-Columns T0 and T1 of cell, where i is the number of child of cell. | |
| virtual std::ostream & | info (std::ostream &os) const |
| Returns information in an output stream. | |
| virtual Element< F > * | newElement_ (concepts::Cell2 &cell, ushort *pMax, concepts::TColumn< F > *T0, concepts::TColumn< F > *T1) const =0 |
Creates and returns an element for cell. | |
Strategies to Build the Degrees of Freedom | |
| void | setBuildVertexDofs_ (const BuildTColumnsBase< F > *b) |
| Change the strategy how the degrees of freedom for the vertices are built. | |
| void | setBuildEdgeDofs_ (const BuildTColumnsBase< F > *b) |
| Change the strategy how the degrees of freedom for the edge are built. | |
| void | setBuildInnerDofs_ (const BuildTColumnsBase< F > *b) |
| Change the strategy how the degrees of freedom for the interior are built. | |
Protected Attributes | |
| uint | idxEdge_ |
| uint | idxInner_ |
| uint | idxVtx_ |
| Number of indices on entities, just for statistics. | |
| uint | nelm_ |
| Number of elements currently active in the mesh. | |
| uint | offset_ |
| Initially given offset, holden for control, if in there are changes in the previous subspace. | |
| hpFull *const | prebuild_ |
| Mesh and degrees of freedoms. | |
| concepts::SubspaceHelper< F, SpacePreBuilder > | spc_ |
| Helper class for building elements with space pre builder, boundary conditions and index. | |
| bool | zeroDim_ |
| Control, if dimension at last build is zero. | |
Private Member Functions | |
| void | buildElements_ (concepts::Cell2 &cell, ushort *Pmax, concepts::TColumn< F > *T0=0) |
| void | setEdgePassive_ (const concepts::Connector1 &cntr) |
| Set this edge and all children edges passive. | |
| template<class G > | |
| void | setVtxPassive_ (G &cntr, bool forChildren=false, bool always=false) |
| Set vertices passive. | |
Private Attributes | |
| uint | build_ |
| Number of the build. | |
| std::auto_ptr< const BuildTColumnsBase< F > > | buildEdgeDofs_ |
| Strategy to build the edge degrees of freedom. | |
| std::auto_ptr< const BuildTColumnsBase< F > > | buildInnerDofs_ |
| Strategy to build the inner degrees of freedom. | |
| std::auto_ptr< const BuildTColumnsBase< F > > | buildVertexDofs_ |
| Strategy to build the vertex degrees of freedom. | |
| uint | dofBuild_ |
| Number of the build of prebuild_ at last call of rebuild() | |
| concepts::Joiner< Element< F > *, 1 > * | elm_ |
| Linked list of the elements. | |
| bool | notAvailable_ |
| Flag indicating some reasons the space is not available. | |
| bool | ownPrebuild_ |
| If prebuild object is created here and not given. | |
hp-adaptive space with 2D elements.
Definition at line 31 of file hpAdaptiveSpace.hh.
| typedef concepts::Scan<hp2D::Element<F> > hp2D::hpAdaptiveSpace< F >::Scan |
Reimplemented in hp2D::ThinSheetSpaceH1, hp2D::hpAdaptiveSpaceH1, and hp2D::hpAdaptiveSpaceHCurl.
Definition at line 36 of file hpAdaptiveSpace.hh.
typedef Scan<ElementWithCell<F> > concepts::SpaceOnCells< F >::Scanner [inherited] |
Reimplemented from concepts::Space< F >.
Reimplemented in linDG3D::FvdgSpace.
| typedef F hp2D::hpAdaptiveSpace< F >::t_type |
Definition at line 37 of file hpAdaptiveSpace.hh.
| hp2D::hpAdaptiveSpace< F >::hpAdaptiveSpace | ( | concepts::Mesh2 & | msh, |
| uint | l, | ||
| uint | p, | ||
| concepts::BoundaryConditions * | bc = 0, |
||
| concepts::CellConditions * | cc = 0 |
||
| ) |
Constructor.
Scans the mesh and sets the cells in the mesh active and the level of refinement and the polynomial degree in all cells to the given values. rebuild_ is set to true, ie. if the mesh is used it will firstly be rebuilt.
| msh | The domain of interest partitioned into a mesh. |
| l | Level of refinement |
| p | Degree of the polynomials to be used. |
| bc | Boundary conditions |
| cc | Cell conditionss |
| hp2D::hpAdaptiveSpace< F >::hpAdaptiveSpace | ( | hpFull & | prebuild, |
| concepts::BoundaryConditions * | bc = 0, |
||
| concepts::CellConditions * | cc = 0, |
||
| uint | spcNo = 0, |
||
| uint * | offset = 0, |
||
| uint * | idx = 0 |
||
| ) |
Constructor for using same mesh and distribution of degrees of freedom object as another space.
The global indices are sorted by the topological entities, on which the degrees of freedoms lie. Spaces could have no common entities, e.g. first space has Dirichlet boundary and this has only dof on the boundary. If they have common entities, like in mixed problems, the global indices per topological entity can be uniquely given by spcNo.
| prebuild | space pre builder |
| bc | Boundary conditions |
| cc | Cell conditions |
| spcNo | Number to distinguish between global indices on same topological entity. |
| offset | Last index of previous space. |
| idx | pointer to index, when wanting a common index. If non zero you should set the parameter "all" in the bilinear form to true. |
| hp2D::hpAdaptiveSpace< F >::hpAdaptiveSpace | ( | const hpAdaptiveSpace< F > & | spc | ) |
Copy constructor.
Copies mesh, boundary conditions and ctrl2_ (information about refinements and polynomial degrees of the elements).
| virtual hp2D::hpAdaptiveSpace< F >::~hpAdaptiveSpace | ( | ) | [virtual] |
| virtual void hp2D::hpAdaptiveSpace< F >::adjust | ( | const concepts::Element< F > & | elm, |
| const concepts::AdaptiveAdjustP< 2 > & | a | ||
| ) | [virtual] |
Adjusts the space in the next rebuild step for this element.
Implements concepts::AdaptiveSpace< F, concepts::AdaptiveAdjustP< 2 > >.
| virtual concepts::TColumn<F>* hp2D::hpAdaptiveSpace< F >::applySmatrices_ | ( | const concepts::Element< F > & | elm, |
| uint | i, | ||
| const concepts::TColumn< F > * | T0, | ||
| const concepts::TColumn< F > * | T1 | ||
| ) | [protected, pure virtual] |
Apply i -th S matrix to T-Columns T0 and T1 of cell, where i is the number of child of cell.
Returns resulting T-Columns.
Implemented in hp2D::ThinSheetSpaceH1, hp2D::hpAdaptiveSpaceH1, and hp2D::hpAdaptiveSpaceHCurl.
| std::pair<bool, uint> hp2D::hpAdaptiveSpace< F >::available | ( | ) | const |
Returns 0 if the space has to be rebuilt with rebuild(), otherwise the number of the build.
This number helps in the decision of availability.
| void hp2D::hpAdaptiveSpace< F >::buildElements_ | ( | concepts::Cell2 & | cell, |
| ushort * | Pmax, | ||
| concepts::TColumn< F > * | T0 = 0 |
||
| ) | [private] |
| uint hp2D::hpAdaptiveSpace< F >::dim | ( | ) | [inline] |
Definition at line 257 of file hpAdaptiveSpace.hh.
| uint hp2D::hpAdaptiveSpace< F >::dim | ( | ) | const [inline, virtual] |
Returns the dimension of the space.
Implements concepts::Space< F >.
Definition at line 236 of file hpAdaptiveSpace.hh.
| concepts::SubspaceHelper<F, SpacePreBuilder>& hp2D::hpAdaptiveSpace< F >::helper | ( | ) | [inline] |
Definition at line 87 of file hpAdaptiveSpace.hh.
| virtual std::ostream& hp2D::hpAdaptiveSpace< F >::info | ( | std::ostream & | os | ) | const [protected, virtual] |
Returns information in an output stream.
Reimplemented from concepts::SpaceOnCells< F >.
Reimplemented in hp2D::ThinSheetSpaceH1, hp2D::hpAdaptiveSpaceH1, and hp2D::hpAdaptiveSpaceHCurl.
| virtual const uint& hp2D::hpAdaptiveSpace< F >::lastIdx | ( | ) | const [inline, virtual] |
Definition at line 89 of file hpAdaptiveSpace.hh.
| virtual uint& hp2D::hpAdaptiveSpace< F >::lastIdx | ( | ) | [inline, virtual] |
Returns last global index of the space.
Implements concepts::Subspace.
Definition at line 88 of file hpAdaptiveSpace.hh.
| uint hp2D::hpAdaptiveSpace< F >::nelm | ( | ) | const [inline, virtual] |
Returns the number of elements in the space.
Implements concepts::Space< F >.
Definition at line 243 of file hpAdaptiveSpace.hh.
| uint hp2D::hpAdaptiveSpace< F >::nelm | ( | ) | [inline] |
Definition at line 263 of file hpAdaptiveSpace.hh.
| virtual Element<F>* hp2D::hpAdaptiveSpace< F >::newElement_ | ( | concepts::Cell2 & | cell, |
| ushort * | pMax, | ||
| concepts::TColumn< F > * | T0, | ||
| concepts::TColumn< F > * | T1 | ||
| ) | const [protected, pure virtual] |
Creates and returns an element for cell.
Has to be implemented in the derived classes.
Implemented in hp2D::ThinSheetSpaceH1, hp2D::hpAdaptiveSpaceH1, and hp2D::hpAdaptiveSpaceHCurl.
| virtual uint hp2D::hpAdaptiveSpace< F >::offset | ( | ) | const [inline, virtual] |
Returns the offset.
Implements concepts::Subspace.
Definition at line 90 of file hpAdaptiveSpace.hh.
| hpFull& hp2D::hpAdaptiveSpace< F >::prebuild | ( | ) | const [inline] |
Definition at line 85 of file hpAdaptiveSpace.hh.
| hpFull& hp2D::hpAdaptiveSpace< F >::prebuild | ( | ) | [inline] |
Definition at line 84 of file hpAdaptiveSpace.hh.
| void hp2D::hpAdaptiveSpace< F >::rebuild | ( | bool | sameIndices = false | ) |
Rebuilds the mesh and the elements due to adjustment orders.
| sameIndices | If true, the already existing indices (stored in the space pre builder) won't be cleared. That is useful for domain decomposition for example. |
| virtual void hp2D::hpAdaptiveSpace< F >::recomputeShapefunctions | ( | ) | [pure virtual] |
Recompute shape functions, e.g.
for other abscissas redefined through setIntegrationRule
Implemented in hp2D::hpAdaptiveSpaceH1, and hp2D::hpAdaptiveSpaceHCurl.
| hpAdaptiveSpace< F >::Scan * hp2D::hpAdaptiveSpace< F >::scan | ( | ) | const [inline, virtual] |
Returns a scanner to iterate over the elements of the space.
Implements concepts::SpaceOnCells< F >.
Definition at line 250 of file hpAdaptiveSpace.hh.
| hpAdaptiveSpace< F >::Scan * hp2D::hpAdaptiveSpace< F >::scan | ( | ) | [inline] |
Definition at line 269 of file hpAdaptiveSpace.hh.
| void hp2D::hpAdaptiveSpace< F >::setBuildEdgeDofs_ | ( | const BuildTColumnsBase< F > * | b | ) | [protected] |
Change the strategy how the degrees of freedom for the edge are built.
The default strategy is BuildEdgeDofs. You can change this strategy any time you chose.
buildEdgeDofs_ is reset with a clone of b.
| b | New strategy |
| void hp2D::hpAdaptiveSpace< F >::setBuildInnerDofs_ | ( | const BuildTColumnsBase< F > * | b | ) | [protected] |
Change the strategy how the degrees of freedom for the interior are built.
The default strategy is BuildInnerDofsLinTrunk. You can change this strategy any time you chose.
buildInnerDofs_ is reset with a clone of b.
| b | New strategy |
| void hp2D::hpAdaptiveSpace< F >::setBuildVertexDofs_ | ( | const BuildTColumnsBase< F > * | b | ) | [protected] |
Change the strategy how the degrees of freedom for the vertices are built.
The default strategy is BuildVertexDofs. You can change this strategy any time you chose.
buildVertexDofs_ is reset with a clone of b.
| b | New strategy |
| void hp2D::hpAdaptiveSpace< F >::setEdgePassive_ | ( | const concepts::Connector1 & | cntr | ) | [private] |
Set this edge and all children edges passive.
| void hp2D::hpAdaptiveSpace< F >::setVtxPassive_ | ( | G & | cntr, |
| bool | forChildren = false, |
||
| bool | always = false |
||
| ) | [private] |
Set vertices passive.
always = false, forChildren = false)always = false, forChildren = true)always = true, forChildren = false) uint hp2D::hpAdaptiveSpace< F >::build_ [private] |
Number of the build.
Definition at line 199 of file hpAdaptiveSpace.hh.
std::auto_ptr<const BuildTColumnsBase<F> > hp2D::hpAdaptiveSpace< F >::buildEdgeDofs_ [private] |
Strategy to build the edge degrees of freedom.
Can be changed with buildEdgeDofs.
Definition at line 209 of file hpAdaptiveSpace.hh.
std::auto_ptr<const BuildTColumnsBase<F> > hp2D::hpAdaptiveSpace< F >::buildInnerDofs_ [private] |
Strategy to build the inner degrees of freedom.
Can be changed with buildInnerDofs.
Definition at line 213 of file hpAdaptiveSpace.hh.
std::auto_ptr<const BuildTColumnsBase<F> > hp2D::hpAdaptiveSpace< F >::buildVertexDofs_ [private] |
Strategy to build the vertex degrees of freedom.
Can be changed with buildVertexDofs.
Definition at line 205 of file hpAdaptiveSpace.hh.
uint hp2D::hpAdaptiveSpace< F >::dofBuild_ [private] |
Number of the build of prebuild_ at last call of rebuild()
Definition at line 197 of file hpAdaptiveSpace.hh.
concepts::Joiner<Element<F>*, 1>* hp2D::hpAdaptiveSpace< F >::elm_ [private] |
Linked list of the elements.
Definition at line 201 of file hpAdaptiveSpace.hh.
uint hp2D::hpAdaptiveSpace< F >::idxEdge_ [protected] |
Definition at line 145 of file hpAdaptiveSpace.hh.
uint hp2D::hpAdaptiveSpace< F >::idxInner_ [protected] |
Definition at line 145 of file hpAdaptiveSpace.hh.
uint hp2D::hpAdaptiveSpace< F >::idxVtx_ [protected] |
Number of indices on entities, just for statistics.
Definition at line 145 of file hpAdaptiveSpace.hh.
uint hp2D::hpAdaptiveSpace< F >::nelm_ [protected] |
Number of elements currently active in the mesh.
Definition at line 132 of file hpAdaptiveSpace.hh.
bool hp2D::hpAdaptiveSpace< F >::notAvailable_ [private] |
Flag indicating some reasons the space is not available.
Definition at line 215 of file hpAdaptiveSpace.hh.
uint hp2D::hpAdaptiveSpace< F >::offset_ [protected] |
Initially given offset, holden for control, if in there are changes in the previous subspace.
Definition at line 137 of file hpAdaptiveSpace.hh.
bool hp2D::hpAdaptiveSpace< F >::ownPrebuild_ [private] |
If prebuild object is created here and not given.
Definition at line 195 of file hpAdaptiveSpace.hh.
hpFull* const hp2D::hpAdaptiveSpace< F >::prebuild_ [protected] |
Mesh and degrees of freedoms.
Definition at line 124 of file hpAdaptiveSpace.hh.
concepts::SubspaceHelper<F, SpacePreBuilder> hp2D::hpAdaptiveSpace< F >::spc_ [protected] |
Helper class for building elements with space pre builder, boundary conditions and index.
Definition at line 129 of file hpAdaptiveSpace.hh.
bool hp2D::hpAdaptiveSpace< F >::zeroDim_ [protected] |
Control, if dimension at last build is zero.
That is needed to distinguish from not built state, if the index counter is reset.
Definition at line 142 of file hpAdaptiveSpace.hh.