hp2D::hpAdaptiveSpaceH1 Class Referenceabstract
#include <hpAdaptiveSpaceH1.hh>
Public Types | |
typedef concepts::Scan< hp2D::Element< Real > > | Scan |
typedef Scan< ElementWithCell< Real > > | Scanner |
typedef Real | t_type |
typedef ElementWithCell< Real > | type |
Public Member Functions | |
virtual void | adjust (const concepts::Element< Real > &elm, const concepts::AdaptiveAdjustP< 2 > &a) |
Adjusts the space in the next rebuild step for this element. More... | |
virtual void | adjust (const Element< Real > &elm, const concepts::AdaptiveAdjustP< 2 > &a)=0 |
Adjusts the space in the next rebuild step for this element. More... | |
const std::set< concepts::Cell2 * > | allCells () const |
std::pair< bool, uint > | available () const |
Returns 0 if the space has to be rebuilt with rebuild(), otherwise the number of the build. More... | |
uint | dim () |
virtual uint | dim () const |
Returns the dimension of the space. More... | |
virtual uint | getOutputDimension () const |
Returns the default output dimension, when we consider plotting a real-valued operator on this space. More... | |
concepts::SubspaceHelper< Real, SpacePreBuilder > & | helper () |
const concepts::SubspaceHelper< Real, SpacePreBuilder > & | helper () const |
hpAdaptiveSpaceH1 (concepts::Mesh2 &msh, const concepts::InOutParameters input) | |
Constructor with boundary conditions and refinement strategy from input parameters. More... | |
hpAdaptiveSpaceH1 (concepts::Mesh2 &msh, uint l, uint p, concepts::BoundaryConditions *bc=0, concepts::CellConditions *cc=0) | |
Constructor. More... | |
hpAdaptiveSpaceH1 (const hpAdaptiveSpaceH1 &spc) | |
Copy constructor. More... | |
hpAdaptiveSpaceH1 (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. More... | |
virtual uint & | lastIdx () |
Returns last global index of the space. More... | |
virtual const uint & | lastIdx () const |
uint | nelm () |
virtual uint | nelm () const |
Returns the number of elements in the space. More... | |
virtual uint | offset () const |
Returns the offset. More... | |
virtual uint | offset () const =0 |
Returns the offset. More... | |
hpFull & | prebuild () |
hpFull & | prebuild () const |
void | rebuild (bool sameIndices=false) |
Rebuilds the mesh and the elements due to adjustment orders. More... | |
Scan * | scan () |
virtual Scan * | scan () const |
Returns a scanner to iterate over the elements of the space. More... | |
void | set_bc (const concepts::BoundaryConditions *bc) |
Reset boundary conditions to bc More... | |
virtual | ~hpAdaptiveSpaceH1 () |
Protected Attributes | |
uint | idxEdge_ |
uint | idxInner_ |
uint | idxVtx_ |
Number of indices on entities, just for statistics. More... | |
uint | nelm_ |
Number of elements currently active in the mesh. More... | |
uint | offset_ |
Initially given offset, holden for control, if in there are changes in the previous subspace. More... | |
hpFull *const | prebuild_ |
Mesh and degrees of freedoms. More... | |
concepts::SubspaceHelper< Real, SpacePreBuilder > | spc_ |
Helper class for building elements with space pre builder, boundary conditions and index. More... | |
bool | zeroDim_ |
Control, if dimension at last build is zero. More... | |
Strategies to Build the Degrees of Freedom | |
bool | ownPrebuild_ |
If prebuild object is created here and not given. More... | |
uint | dofBuild_ |
Number of the build of prebuild_ at last call of rebuild() More... | |
uint | build_ |
Number of the build. More... | |
concepts::Joiner< Element< Real > *, 1 > * | elm_ |
Linked list of the elements. More... | |
std::unique_ptr< const BuildTColumnsBase< Real > > | buildVertexDofs_ |
Strategy to build the vertex degrees of freedom. More... | |
std::unique_ptr< const BuildTColumnsBase< Real > > | buildEdgeDofs_ |
Strategy to build the edge degrees of freedom. More... | |
std::unique_ptr< const BuildTColumnsBase< Real > > | buildInnerDofs_ |
Strategy to build the inner degrees of freedom. More... | |
bool | notAvailable_ |
Flag indicating some reasons the space is not available. More... | |
void | setBuildVertexDofs_ (const BuildTColumnsBase< Real > *b) |
Change the strategy how the degrees of freedom for the vertices are built. More... | |
void | setBuildEdgeDofs_ (const BuildTColumnsBase< Real > *b) |
Change the strategy how the degrees of freedom for the edge are built. More... | |
void | setBuildInnerDofs_ (const BuildTColumnsBase< Real > *b) |
Change the strategy how the degrees of freedom for the interior are built. More... | |
void | buildElements_ (concepts::Cell2 &cell, ushort *Pmax, concepts::TColumn< Real > *T0=0) |
If prebuild object is created here and not given. More... | |
void | setVtxPassive_ (G &cntr, bool forChildren=false, bool always=false) |
Set vertices passive. More... | |
void | setEdgePassive_ (const concepts::Connector1 &cntr) |
Set this edge and all children edges passive. More... | |
Strategies to Build the Degrees of Freedom | |
std::unique_ptr< concepts::SMatrix1D > | S1left_ |
S matrices in 1D. More... | |
std::unique_ptr< concepts::SMatrix1D > | S1right_ |
S matrices in 1D. More... | |
std::unique_ptr< concepts::SMatrixBase< Real > > | Smatrices2H_ [2] |
S matrices for horizontal subdivision. More... | |
std::unique_ptr< concepts::SMatrixBase< Real > > | Smatrices2V_ [2] |
S matrices for vertical subdivision. More... | |
std::unique_ptr< concepts::SMatrixBase< Real > > | Smatrices4_ [4] |
S matrices for subdivision into 4 quads. More... | |
void | buildVertexDofs (const BuildTColumnsBase< Real > *b) |
Change the strategy how the degrees of freedom for the vertices are built. More... | |
void | buildEdgeDofs (const BuildTColumnsBase< Real > *b) |
Change the strategy how the degrees of freedom for the edge are built. More... | |
void | buildInnerDofs (const BuildTColumnsBase< Real > *b) |
Change the strategy how the degrees of freedom for the interior are built. More... | |
virtual void | recomputeShapefunctions () |
Recompute shape functions, e.g. More... | |
virtual std::ostream & | info (std::ostream &os) const |
S matrices in 1D. More... | |
virtual Element< Real > * | newElement_ (concepts::Cell2 &cell, ushort *pMax, concepts::TColumn< Real > *T0, concepts::TColumn< Real > *T1) const |
Creates and returns an element for cell . More... | |
virtual concepts::TColumn< Real > * | applySmatrices_ (const concepts::Element< Real > &elm, uint i, const concepts::TColumn< Real > *T0, const concepts::TColumn< Real > *T1) |
Apply i -th S matrix to T-Columns T0 and T1 of the element elm , where i is the number of child of elm . More... | |
void | recomputeSmatrices_ (const Quad< Real > &elm) |
Checks if the S matrices need to be recomputed and does so if necessary. More... | |
Detailed Description
- Examples
- cig_load_input_data.cc, elasticity2D_tutorial.cc, exactDtN.cc, howToGetStarted.cc, inhomDirichletBCs.cc, inhomDirichletBCsLagrange.cc, inhomNeumannBCs.cc, parallelizationTutorial.cc, and RobinBCs.cc.
Definition at line 63 of file hpAdaptiveSpaceH1.hh.
Member Typedef Documentation
◆ Scan
typedef concepts::Scan<hp2D::Element<Real> > hp2D::hpAdaptiveSpaceH1::Scan |
Definition at line 65 of file hpAdaptiveSpaceH1.hh.
◆ Scanner
|
inherited |
◆ t_type
|
inherited |
Definition at line 39 of file hpAdaptiveSpace.hh.
◆ type
|
inherited |
Constructor & Destructor Documentation
◆ hpAdaptiveSpaceH1() [1/4]
hp2D::hpAdaptiveSpaceH1::hpAdaptiveSpaceH1 | ( | 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.
- Parameters
-
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 conditions
REMARK: If and only if the flag emptyElements of the cell conditions cc
is set to false, empty elements will not be built for inactive cells.
◆ hpAdaptiveSpaceH1() [2/4]
hp2D::hpAdaptiveSpaceH1::hpAdaptiveSpaceH1 | ( | concepts::Mesh2 & | msh, |
const concepts::InOutParameters | input | ||
) |
Constructor with boundary conditions and refinement strategy from input parameters.
- See also
- hpAdaptiveSpaceH1FromInput
◆ hpAdaptiveSpaceH1() [3/4]
hp2D::hpAdaptiveSpaceH1::hpAdaptiveSpaceH1 | ( | 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
.
- Parameters
-
prebuild space pre builder bc Boundary conditions cc Cell conditions spcNo Number for distinguish between global indices on same topological entity. offset Last index of previous space. idx pointer to index, when wanting a common index
REMARK: If and only if the flag emptyElements of the cell conditions cc
is set to false, empty elements will not be built for inactive cells.
◆ hpAdaptiveSpaceH1() [4/4]
hp2D::hpAdaptiveSpaceH1::hpAdaptiveSpaceH1 | ( | const hpAdaptiveSpaceH1 & | spc | ) |
Copy constructor.
Copies mesh, boundary conditions and ctrl2_
(information about refinements and polynomial degrees of the elements).
◆ ~hpAdaptiveSpaceH1()
|
virtual |
Member Function Documentation
◆ adjust() [1/2]
|
virtualinherited |
Adjusts the space in the next rebuild step for this element.
◆ adjust() [2/2]
|
pure virtualinherited |
Adjusts the space in the next rebuild step for this element.
◆ allCells()
|
inlinevirtualinherited |
Implements concepts::SpaceOnCoarseCells< 2, Real >.
Definition at line 126 of file hpAdaptiveSpace.hh.
◆ applySmatrices_()
|
protectedvirtual |
Apply i
-th S matrix to T-Columns T0
and T1
of the element elm
, where i
is the number of child of elm
.
Returns resulting T-Columns.
Implements hp2D::hpAdaptiveSpace< Real >.
◆ available()
|
inherited |
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.
◆ buildEdgeDofs()
|
inline |
Change the strategy how the degrees of freedom for the edge are built.
The default strategy is BuildH1EdgeTColumns. You can change this strategy any time you chose.
buildEdgeDofs_ is reset with a clone of b
.
- Parameters
-
b New strategy
Definition at line 145 of file hpAdaptiveSpaceH1.hh.
◆ buildElements_()
|
privateinherited |
If prebuild object is created here and not given.
◆ buildInnerDofs()
|
inline |
Change the strategy how the degrees of freedom for the interior are built.
The default strategy is BuildH1InnerTColumns. You can change this strategy any time you chose.
buildInnerDofs_ is reset with a clone of b
.
- Parameters
-
b New strategy
Definition at line 156 of file hpAdaptiveSpaceH1.hh.
◆ buildVertexDofs()
|
inline |
Change the strategy how the degrees of freedom for the vertices are built.
The default strategy is BuildH1VtxTColumns. You can change this strategy any time you chose.
buildVertexDofs_ is reset with a clone of b
.
- Parameters
-
b New strategy
Definition at line 135 of file hpAdaptiveSpaceH1.hh.
◆ dim() [1/2]
|
inlinevirtualinherited |
Implements concepts::SpaceOnCells< Real >.
Definition at line 100 of file hpAdaptiveSpace.hh.
◆ dim() [2/2]
|
inlinevirtualinherited |
Returns the dimension of the space.
Implements concepts::SpaceOnCells< Real >.
- Examples
- exactDtN.cc, and inhomDirichletBCsLagrange.cc.
Definition at line 96 of file hpAdaptiveSpace.hh.
◆ getOutputDimension()
|
inlinevirtualinherited |
◆ helper() [1/2]
|
inlineinherited |
Definition at line 91 of file hpAdaptiveSpace.hh.
◆ helper() [2/2]
|
inlineinherited |
Definition at line 89 of file hpAdaptiveSpace.hh.
◆ info()
|
protectedvirtual |
S matrices in 1D.
Reimplemented from hp2D::hpAdaptiveSpace< Real >.
◆ lastIdx() [1/2]
|
inlinevirtualinherited |
Returns last global index of the space.
Implements concepts::Subspace.
Definition at line 92 of file hpAdaptiveSpace.hh.
◆ lastIdx() [2/2]
|
inlinevirtualinherited |
Implements concepts::Subspace.
Definition at line 93 of file hpAdaptiveSpace.hh.
◆ nelm() [1/2]
|
inlinevirtualinherited |
Implements concepts::SpaceOnCells< Real >.
Definition at line 101 of file hpAdaptiveSpace.hh.
◆ nelm() [2/2]
|
inlinevirtualinherited |
Returns the number of elements in the space.
Implements concepts::SpaceOnCells< Real >.
Definition at line 97 of file hpAdaptiveSpace.hh.
◆ newElement_()
|
protectedvirtual |
Creates and returns an element for cell
.
Implements hp2D::hpAdaptiveSpace< Real >.
◆ offset() [1/2]
|
inlinevirtualinherited |
Returns the offset.
Definition at line 94 of file hpAdaptiveSpace.hh.
◆ offset() [2/2]
|
pure virtualinherited |
Returns the offset.
Implemented in concepts::DomainDecomp< F >, and hp2D::hpAdaptiveSpace< F >.
◆ prebuild() [1/2]
|
inlineinherited |
Definition at line 86 of file hpAdaptiveSpace.hh.
◆ prebuild() [2/2]
|
inlineinherited |
Definition at line 87 of file hpAdaptiveSpace.hh.
◆ rebuild()
|
inherited |
Rebuilds the mesh and the elements due to adjustment orders.
- Parameters
-
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.
◆ recomputeShapefunctions()
|
virtual |
Recompute shape functions, e.g.
for other abscissas redefined through setIntegrationRule
Implements hp2D::hpAdaptiveSpace< Real >.
◆ recomputeSmatrices_()
|
private |
Checks if the S matrices need to be recomputed and does so if necessary.
- Parameters
-
elm Cell for which the S matrices are needed (the polynomial degrees and shape functions are important)
◆ scan() [1/2]
|
inlinevirtualinherited |
Implements concepts::SpaceOnCells< Real >.
Definition at line 102 of file hpAdaptiveSpace.hh.
◆ scan() [2/2]
|
inlinevirtualinherited |
Returns a scanner to iterate over the elements of the space.
Implements concepts::SpaceOnCells< Real >.
Definition at line 98 of file hpAdaptiveSpace.hh.
◆ set_bc()
|
inlineinherited |
Reset boundary conditions to bc
Definition at line 122 of file hpAdaptiveSpace.hh.
◆ setBuildEdgeDofs_()
|
protectedinherited |
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
.
- Parameters
-
b New strategy
◆ setBuildInnerDofs_()
|
protectedinherited |
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
.
- Parameters
-
b New strategy
◆ setBuildVertexDofs_()
|
protectedinherited |
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
.
- Parameters
-
b New strategy
◆ setEdgePassive_()
|
privateinherited |
Set this edge and all children edges passive.
◆ setVtxPassive_()
|
privateinherited |
Set vertices passive.
- For dirichlet vertices of a cell. (
always
= false,forChildren
= false) - For vertices of a dirichlet edge, also inside edge. (
always
= false,forChildren
= true) - All vertices of cells. (
always
= true,forChildren
= false)
Member Data Documentation
◆ build_
|
privateinherited |
Number of the build.
Definition at line 212 of file hpAdaptiveSpace.hh.
◆ buildEdgeDofs_
|
privateinherited |
Strategy to build the edge degrees of freedom.
Can be changed with buildEdgeDofs.
Definition at line 222 of file hpAdaptiveSpace.hh.
◆ buildInnerDofs_
|
privateinherited |
Strategy to build the inner degrees of freedom.
Can be changed with buildInnerDofs.
Definition at line 226 of file hpAdaptiveSpace.hh.
◆ buildVertexDofs_
|
privateinherited |
Strategy to build the vertex degrees of freedom.
Can be changed with buildVertexDofs.
Definition at line 218 of file hpAdaptiveSpace.hh.
◆ dofBuild_
|
privateinherited |
Number of the build of prebuild_ at last call of rebuild()
Definition at line 210 of file hpAdaptiveSpace.hh.
◆ elm_
|
privateinherited |
Linked list of the elements.
Definition at line 214 of file hpAdaptiveSpace.hh.
◆ idxEdge_
|
protectedinherited |
Definition at line 158 of file hpAdaptiveSpace.hh.
◆ idxInner_
|
protectedinherited |
Definition at line 158 of file hpAdaptiveSpace.hh.
◆ idxVtx_
|
protectedinherited |
Number of indices on entities, just for statistics.
Definition at line 158 of file hpAdaptiveSpace.hh.
◆ nelm_
|
protectedinherited |
Number of elements currently active in the mesh.
Definition at line 145 of file hpAdaptiveSpace.hh.
◆ notAvailable_
|
privateinherited |
Flag indicating some reasons the space is not available.
Definition at line 228 of file hpAdaptiveSpace.hh.
◆ offset_
|
protectedinherited |
Initially given offset, holden for control, if in there are changes in the previous subspace.
Definition at line 150 of file hpAdaptiveSpace.hh.
◆ ownPrebuild_
|
privateinherited |
If prebuild object is created here and not given.
Definition at line 208 of file hpAdaptiveSpace.hh.
◆ prebuild_
|
protectedinherited |
Mesh and degrees of freedoms.
Definition at line 137 of file hpAdaptiveSpace.hh.
◆ S1left_
|
private |
S matrices in 1D.
Definition at line 192 of file hpAdaptiveSpaceH1.hh.
◆ S1right_
|
private |
S matrices in 1D.
Definition at line 192 of file hpAdaptiveSpaceH1.hh.
◆ Smatrices2H_
|
private |
S matrices for horizontal subdivision.
- See also
- concepts::Quad2dSubdiv2H
Definition at line 197 of file hpAdaptiveSpaceH1.hh.
◆ Smatrices2V_
|
private |
S matrices for vertical subdivision.
- See also
- concepts::Quad2dSubdiv2V
Definition at line 202 of file hpAdaptiveSpaceH1.hh.
◆ Smatrices4_
|
private |
S matrices for subdivision into 4 quads.
- See also
- concepts::Quad2dSubdiv4
Definition at line 207 of file hpAdaptiveSpaceH1.hh.
◆ spc_
|
protectedinherited |
Helper class for building elements with space pre builder, boundary conditions and index.
Definition at line 142 of file hpAdaptiveSpace.hh.
◆ zeroDim_
|
protectedinherited |
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 155 of file hpAdaptiveSpace.hh.
The documentation for this class was generated from the following file:
- hp2D/hpAdaptiveSpaceH1.hh