#include <hpAdaptiveSpace.hh>
Public Types | |
typedef concepts::Scan< hp2D::Element< F > > | Scan |
typedef F | t_type |
typedef ElementWithCell< F > | type |
typedef Scan< ElementWithCell< F > > | Scanner |
Public Member Functions | |
hpAdaptiveSpace (concepts::Mesh2 &msh, uint l, uint p, concepts::BoundaryConditions *bc=0, concepts::CellConditions *cc=0) | |
hpAdaptiveSpace (hpFull &prebuild, concepts::BoundaryConditions *bc=0, concepts::CellConditions *cc=0, uint spcNo=0, uint *offset=0, uint *idx=0) | |
hpAdaptiveSpace (const hpAdaptiveSpace &spc) | |
hpFull & | prebuild () |
hpFull & | prebuild () const |
const concepts::SubspaceHelper< F, SpacePreBuilder > & | helper () const |
concepts::SubspaceHelper< F, SpacePreBuilder > & | helper () |
virtual uint & | lastIdx () |
Returns last global index of the space. | |
virtual const uint & | lastIdx () const |
virtual uint | offset () const |
Returns the offset. | |
virtual uint | dim () const |
Returns the dimension of the space. | |
virtual uint | nelm () const |
Returns the number of elements in the space. | |
virtual Scan * | scan () const |
Returns a scanner to iterate over the elements of the space. | |
uint | dim () |
uint | nelm () |
Scan * | scan () |
virtual void | adjust (const concepts::Element< F > &elm, const concepts::AdaptiveAdjustP< 2 > &a) |
void | rebuild (bool sameIndices=false) |
std::pair< bool, uint > | available () const |
void | set_bc (const concepts::BoundaryConditions *bc) |
Reset boundary conditions to bc | |
const std::set< concepts::Cell2 * > | allCells () const |
virtual void | recomputeShapefunctions ()=0 |
virtual uint | getOutputDimension () const |
Returns the default output dimension, when we consider plotting a real-valued operator on this space. | |
Protected Member Functions | |
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 |
virtual concepts::TColumn< F > * | applySmatrices_ (const concepts::Element< F > &elm, uint i, const concepts::TColumn< F > *T0, const concepts::TColumn< F > *T1)=0 |
Protected Attributes | |
hpFull *const | prebuild_ |
Mesh and degrees of freedoms. | |
concepts::SubspaceHelper< F, SpacePreBuilder > | spc_ |
uint | nelm_ |
Number of elements currently active in the mesh. | |
uint | offset_ |
bool | zeroDim_ |
uint | idxVtx_ |
Number of indices on entities, just for statistics. | |
uint | idxEdge_ |
uint | idxInner_ |
Strategies to Build the Degrees of Freedom | |
void | setBuildVertexDofs_ (const BuildTColumnsBase< F > *b) |
void | setBuildEdgeDofs_ (const BuildTColumnsBase< F > *b) |
void | setBuildInnerDofs_ (const BuildTColumnsBase< F > *b) |
hp-adaptive space with 2D elements.
Definition at line 33 of file hpAdaptiveSpace.hh.
typedef concepts::Scan<hp2D::Element<F> > hp2D::hpAdaptiveSpace< F >::Scan |
Definition at line 38 of file hpAdaptiveSpace.hh.
|
inherited |
typedef F hp2D::hpAdaptiveSpace< F >::t_type |
Definition at line 39 of file hpAdaptiveSpace.hh.
|
inherited |
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 |
Adjusts the space in the next rebuild step for this element.
Implements concepts::AdaptiveSpace< F, concepts::AdaptiveAdjustP< 2 > >.
|
inlinevirtual |
Implements concepts::SpaceOnCoarseCells< 2, F >.
Definition at line 126 of file hpAdaptiveSpace.hh.
|
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::hpAdaptiveSpaceH1, and hp2D::hpAdaptiveSpaceL2.
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.
|
inline |
Definition at line 270 of file hpAdaptiveSpace.hh.
|
inlinevirtual |
Returns the dimension of the space.
Implements concepts::SpaceOnCells< F >.
Definition at line 249 of file hpAdaptiveSpace.hh.
|
inlinevirtualinherited |
Returns the default output dimension, when we consider plotting a real-valued operator on this space.
Reimplemented in hp2D::hpAdaptiveSpaceHCurl, and hp2Dedge::Space.
|
inline |
Definition at line 91 of file hpAdaptiveSpace.hh.
|
inline |
Definition at line 89 of file hpAdaptiveSpace.hh.
|
protectedvirtual |
Returns information in an output stream.
Reimplemented from concepts::SpaceOnCoarseCells< 2, F >.
Reimplemented in hp2D::hpAdaptiveSpaceH1, hp2D::hpAdaptiveSpaceL2, and hp2D::hpAdaptiveSpaceHCurl.
|
inlinevirtual |
Returns last global index of the space.
Implements concepts::Subspace.
Definition at line 92 of file hpAdaptiveSpace.hh.
|
inlinevirtual |
Definition at line 93 of file hpAdaptiveSpace.hh.
|
inline |
Definition at line 276 of file hpAdaptiveSpace.hh.
|
inlinevirtual |
Returns the number of elements in the space.
Implements concepts::SpaceOnCells< F >.
Definition at line 256 of file hpAdaptiveSpace.hh.
|
protectedpure virtual |
Creates and returns an element for cell
. Has to be implemented in the derived classes.
Implemented in hp2D::hpAdaptiveSpaceH1, and hp2D::hpAdaptiveSpaceL2.
|
inlinevirtual |
Returns the offset.
Implements concepts::Subspace.
Definition at line 94 of file hpAdaptiveSpace.hh.
|
inline |
Definition at line 86 of file hpAdaptiveSpace.hh.
|
inline |
Definition at line 87 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. |
|
pure virtual |
Recompute shape functions, e.g. for other abscissas redefined through setIntegrationRule
Implemented in hp2D::hpAdaptiveSpaceH1, hp2D::hpAdaptiveSpaceL2, and hp2D::hpAdaptiveSpaceHCurl.
|
inline |
Definition at line 282 of file hpAdaptiveSpace.hh.
|
inlinevirtual |
Returns a scanner to iterate over the elements of the space.
Implements concepts::SpaceOnCells< F >.
Definition at line 263 of file hpAdaptiveSpace.hh.
|
inline |
Reset boundary conditions to bc
Definition at line 122 of file hpAdaptiveSpace.hh.
|
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 |
|
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 |
|
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 |
|
protected |
Definition at line 158 of file hpAdaptiveSpace.hh.
|
protected |
Definition at line 158 of file hpAdaptiveSpace.hh.
|
protected |
Number of indices on entities, just for statistics.
Definition at line 158 of file hpAdaptiveSpace.hh.
|
protected |
Number of elements currently active in the mesh.
Definition at line 145 of file hpAdaptiveSpace.hh.
|
protected |
Initially given offset, holden for control, if in there are changes in the previous subspace
Definition at line 150 of file hpAdaptiveSpace.hh.
|
protected |
Mesh and degrees of freedoms.
Definition at line 137 of file hpAdaptiveSpace.hh.
|
protected |
Helper class for building elements with space pre builder, boundary conditions and index
Definition at line 142 of file hpAdaptiveSpace.hh.
|
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.