hp2D::hpAdaptiveSpace< F > Class Template Referenceabstract
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 |
typedef ElementWithCell< F > | 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. More... | |
const std::set< concepts::Cell2 * > | allCells () const |
virtual const std::set< typename CellType< dimC >::cell * > | allCells () const=0 |
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< F, SpacePreBuilder > & | helper () |
const concepts::SubspaceHelper< F, SpacePreBuilder > & | helper () const |
hpAdaptiveSpace (concepts::Mesh2 &msh, uint l, uint p, concepts::BoundaryConditions *bc=0, concepts::CellConditions *cc=0) | |
Constructor. More... | |
hpAdaptiveSpace (const hpAdaptiveSpace &spc) | |
Copy constructor. More... | |
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. 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... | |
hpFull & | prebuild () |
hpFull & | prebuild () const |
void | rebuild (bool sameIndices=false) |
Rebuilds the mesh and the elements due to adjustment orders. More... | |
virtual void | recomputeShapefunctions ()=0 |
Recompute shape functions, e.g. 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 | ~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 . More... | |
virtual std::ostream & | info (std::ostream &os) const |
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 . More... | |
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< F, 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< F > *, 1 > * | elm_ |
Linked list of the elements. More... | |
std::unique_ptr< const BuildTColumnsBase< F > > | buildVertexDofs_ |
Strategy to build the vertex degrees of freedom. More... | |
std::unique_ptr< const BuildTColumnsBase< F > > | buildEdgeDofs_ |
Strategy to build the edge degrees of freedom. More... | |
std::unique_ptr< const BuildTColumnsBase< F > > | 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< F > *b) |
Change the strategy how the degrees of freedom for the vertices are built. More... | |
void | setBuildEdgeDofs_ (const BuildTColumnsBase< F > *b) |
Change the strategy how the degrees of freedom for the edge are built. More... | |
void | setBuildInnerDofs_ (const BuildTColumnsBase< F > *b) |
Change the strategy how the degrees of freedom for the interior are built. More... | |
void | buildElements_ (concepts::Cell2 &cell, ushort *Pmax, concepts::TColumn< F > *T0=0) |
If prebuild object is created here and not given. More... | |
template<class G > | |
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... | |
Detailed Description
template<class F>
class hp2D::hpAdaptiveSpace< F >
hp-adaptive space with 2D elements.
Definition at line 33 of file hpAdaptiveSpace.hh.
Member Typedef Documentation
◆ Scan
typedef concepts::Scan<hp2D::Element<F> > hp2D::hpAdaptiveSpace< F >::Scan |
Definition at line 38 of file hpAdaptiveSpace.hh.
◆ Scanner
|
inherited |
◆ t_type
typedef F hp2D::hpAdaptiveSpace< F >::t_type |
Definition at line 39 of file hpAdaptiveSpace.hh.
◆ type
|
inherited |
Constructor & Destructor Documentation
◆ hpAdaptiveSpace() [1/3]
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.
- 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 conditionss
◆ hpAdaptiveSpace() [2/3]
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
.
- Parameters
-
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.
◆ hpAdaptiveSpace() [3/3]
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).
◆ ~hpAdaptiveSpace()
|
virtual |
Member Function Documentation
◆ adjust()
|
virtual |
Adjusts the space in the next rebuild step for this element.
Implements concepts::AdaptiveSpace< F, concepts::AdaptiveAdjustP< 2 > >.
◆ allCells() [1/2]
|
inline |
Definition at line 126 of file hpAdaptiveSpace.hh.
◆ allCells() [2/2]
|
pure virtualinherited |
◆ applySmatrices_()
|
protectedpure 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::hpAdaptiveSpaceHCurl, hp2D::hpAdaptiveSpaceL2, and hp2D::hpAdaptiveSpaceH1.
◆ available()
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.
◆ buildElements_()
|
private |
If prebuild object is created here and not given.
◆ dim() [1/2]
|
inline |
Definition at line 270 of file hpAdaptiveSpace.hh.
◆ dim() [2/2]
|
inlinevirtual |
Returns the dimension of the space.
Implements concepts::SpaceOnCells< F >.
Definition at line 249 of file hpAdaptiveSpace.hh.
◆ getOutputDimension()
|
inlinevirtualinherited |
◆ helper() [1/2]
|
inline |
Definition at line 91 of file hpAdaptiveSpace.hh.
◆ helper() [2/2]
|
inline |
Definition at line 89 of file hpAdaptiveSpace.hh.
◆ info()
|
protectedvirtual |
Reimplemented from concepts::SpaceOnCoarseCells< 2, F >.
Reimplemented in hp2D::hpAdaptiveSpaceHCurl, hp2D::hpAdaptiveSpaceL2, and hp2D::hpAdaptiveSpaceH1.
◆ lastIdx() [1/2]
|
inlinevirtual |
Returns last global index of the space.
Implements concepts::Subspace.
Definition at line 92 of file hpAdaptiveSpace.hh.
◆ lastIdx() [2/2]
|
inlinevirtual |
Definition at line 93 of file hpAdaptiveSpace.hh.
◆ nelm() [1/2]
|
inline |
Definition at line 276 of file hpAdaptiveSpace.hh.
◆ nelm() [2/2]
|
inlinevirtual |
Returns the number of elements in the space.
Implements concepts::SpaceOnCells< F >.
Definition at line 256 of file hpAdaptiveSpace.hh.
◆ newElement_()
|
protectedpure virtual |
Creates and returns an element for cell
.
Has to be implemented in the derived classes.
Implemented in hp2D::hpAdaptiveSpaceHCurl, hp2D::hpAdaptiveSpaceL2, and hp2D::hpAdaptiveSpaceH1.
◆ offset()
|
inlinevirtual |
Returns the offset.
Implements concepts::Subspace.
Definition at line 94 of file hpAdaptiveSpace.hh.
◆ prebuild() [1/2]
|
inline |
Definition at line 86 of file hpAdaptiveSpace.hh.
◆ prebuild() [2/2]
|
inline |
Definition at line 87 of file hpAdaptiveSpace.hh.
◆ rebuild()
void hp2D::hpAdaptiveSpace< F >::rebuild | ( | bool | sameIndices = false | ) |
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()
|
pure virtual |
Recompute shape functions, e.g.
for other abscissas redefined through setIntegrationRule
Implemented in hp2D::hpAdaptiveSpaceHCurl, hp2D::hpAdaptiveSpaceL2, and hp2D::hpAdaptiveSpaceH1.
◆ scan() [1/2]
|
inline |
Definition at line 282 of file hpAdaptiveSpace.hh.
◆ scan() [2/2]
|
inlinevirtual |
Returns a scanner to iterate over the elements of the space.
Implements concepts::SpaceOnCells< F >.
Definition at line 263 of file hpAdaptiveSpace.hh.
◆ set_bc()
|
inline |
Reset boundary conditions to bc
Definition at line 122 of file hpAdaptiveSpace.hh.
◆ setBuildEdgeDofs_()
|
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
.
- Parameters
-
b New strategy
◆ setBuildInnerDofs_()
|
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
.
- Parameters
-
b New strategy
◆ setBuildVertexDofs_()
|
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
.
- Parameters
-
b New strategy
◆ setEdgePassive_()
|
private |
Set this edge and all children edges passive.
◆ setVtxPassive_()
|
private |
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_
|
private |
Number of the build.
Definition at line 212 of file hpAdaptiveSpace.hh.
◆ buildEdgeDofs_
|
private |
Strategy to build the edge degrees of freedom.
Can be changed with buildEdgeDofs.
Definition at line 222 of file hpAdaptiveSpace.hh.
◆ buildInnerDofs_
|
private |
Strategy to build the inner degrees of freedom.
Can be changed with buildInnerDofs.
Definition at line 226 of file hpAdaptiveSpace.hh.
◆ buildVertexDofs_
|
private |
Strategy to build the vertex degrees of freedom.
Can be changed with buildVertexDofs.
Definition at line 218 of file hpAdaptiveSpace.hh.
◆ dofBuild_
|
private |
Number of the build of prebuild_ at last call of rebuild()
Definition at line 210 of file hpAdaptiveSpace.hh.
◆ elm_
|
private |
Linked list of the elements.
Definition at line 214 of file hpAdaptiveSpace.hh.
◆ idxEdge_
|
protected |
Definition at line 158 of file hpAdaptiveSpace.hh.
◆ idxInner_
|
protected |
Definition at line 158 of file hpAdaptiveSpace.hh.
◆ idxVtx_
|
protected |
Number of indices on entities, just for statistics.
Definition at line 158 of file hpAdaptiveSpace.hh.
◆ nelm_
|
protected |
Number of elements currently active in the mesh.
Definition at line 145 of file hpAdaptiveSpace.hh.
◆ notAvailable_
|
private |
Flag indicating some reasons the space is not available.
Definition at line 228 of file hpAdaptiveSpace.hh.
◆ offset_
|
protected |
Initially given offset, holden for control, if in there are changes in the previous subspace.
Definition at line 150 of file hpAdaptiveSpace.hh.
◆ ownPrebuild_
|
private |
If prebuild object is created here and not given.
Definition at line 208 of file hpAdaptiveSpace.hh.
◆ prebuild_
|
protected |
Mesh and degrees of freedoms.
Definition at line 137 of file hpAdaptiveSpace.hh.
◆ spc_
|
protected |
Helper class for building elements with space pre builder, boundary conditions and index.
Definition at line 142 of file hpAdaptiveSpace.hh.
◆ 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 155 of file hpAdaptiveSpace.hh.
The documentation for this class was generated from the following file:
- hp2D/hpAdaptiveSpace.hh