Class documentation of Concepts

Loading...
Searching...
No Matches
hp2D::hpAdaptiveSpace< F > Class Template Referenceabstract

#include <hpAdaptiveSpace.hh>

Inheritance diagram for hp2D::hpAdaptiveSpace< F >:
concepts::SpaceOnCoarseCells< 2, F > concepts::AdaptiveSpace< F, concepts::AdaptiveAdjustP< 2 > > concepts::Subspace concepts::SpaceOnCells< F > concepts::Space< F > concepts::OutputOperator

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)
 
hpFullprebuild ()
 
hpFullprebuild () 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 Scanscan () const
 Returns a scanner to iterate over the elements of the space.
 
uint dim ()
 
uint nelm ()
 
Scanscan ()
 
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, SpacePreBuilderspc_
 
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)
 

Detailed Description

template<class F>
class hp2D::hpAdaptiveSpace< F >

hp-adaptive space with 2D elements.

Author
Kersten Schmidt, 2005

Definition at line 33 of file hpAdaptiveSpace.hh.

Member Typedef Documentation

◆ Scan

template<class F >
typedef concepts::Scan<hp2D::Element<F> > hp2D::hpAdaptiveSpace< F >::Scan

Definition at line 38 of file hpAdaptiveSpace.hh.

◆ Scanner

template<class F >
typedef Scan<ElementWithCell<F> > concepts::SpaceOnCells< F >::Scanner
inherited

Definition at line 84 of file space.hh.

◆ t_type

template<class F >
typedef F hp2D::hpAdaptiveSpace< F >::t_type

Definition at line 39 of file hpAdaptiveSpace.hh.

◆ type

template<class F >
typedef ElementWithCell<F> concepts::SpaceOnCells< F >::type
inherited

Definition at line 83 of file space.hh.

Constructor & Destructor Documentation

◆ hpAdaptiveSpace() [1/3]

template<class F >
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
mshThe domain of interest partitioned into a mesh.
lLevel of refinement
pDegree of the polynomials to be used.
bcBoundary conditions
ccCell conditionss

◆ hpAdaptiveSpace() [2/3]

template<class F >
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
prebuildspace pre builder
bcBoundary conditions
ccCell conditions
spcNoNumber to distinguish between global indices on same topological entity.
offsetLast index of previous space.
idxpointer 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]

template<class F >
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).

Member Function Documentation

◆ adjust()

template<class F >
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 > >.

◆ allCells()

template<class F >
const std::set< concepts::Cell2 * > hp2D::hpAdaptiveSpace< F >::allCells ( ) const
inlinevirtual

Implements concepts::SpaceOnCoarseCells< 2, F >.

Definition at line 126 of file hpAdaptiveSpace.hh.

◆ applySmatrices_()

template<class F >
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 
)
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.

◆ available()

template<class F >
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.

◆ dim() [1/2]

template<class F >
uint hp2D::hpAdaptiveSpace< F >::dim ( )
inline

Definition at line 270 of file hpAdaptiveSpace.hh.

◆ dim() [2/2]

template<class F >
uint hp2D::hpAdaptiveSpace< F >::dim ( ) const
inlinevirtual

Returns the dimension of the space.

Implements concepts::SpaceOnCells< F >.

Definition at line 249 of file hpAdaptiveSpace.hh.

◆ getOutputDimension()

template<class F >
virtual uint concepts::Space< F >::getOutputDimension ( ) const
inlinevirtualinherited

Returns the default output dimension, when we consider plotting a real-valued operator on this space.

Reimplemented in hp2D::hpAdaptiveSpaceHCurl, and hp2Dedge::Space.

Definition at line 50 of file space.hh.

◆ helper() [1/2]

template<class F >
concepts::SubspaceHelper< F, SpacePreBuilder > & hp2D::hpAdaptiveSpace< F >::helper ( )
inline

Definition at line 91 of file hpAdaptiveSpace.hh.

◆ helper() [2/2]

template<class F >
const concepts::SubspaceHelper< F, SpacePreBuilder > & hp2D::hpAdaptiveSpace< F >::helper ( ) const
inline

Definition at line 89 of file hpAdaptiveSpace.hh.

◆ info()

template<class F >
virtual std::ostream & hp2D::hpAdaptiveSpace< F >::info ( std::ostream &  os) const
protectedvirtual

Returns information in an output stream.

Reimplemented from concepts::SpaceOnCoarseCells< 2, F >.

Reimplemented in hp2D::hpAdaptiveSpaceH1, hp2D::hpAdaptiveSpaceL2, and hp2D::hpAdaptiveSpaceHCurl.

◆ lastIdx() [1/2]

template<class F >
virtual uint & hp2D::hpAdaptiveSpace< F >::lastIdx ( )
inlinevirtual

Returns last global index of the space.

Implements concepts::Subspace.

Definition at line 92 of file hpAdaptiveSpace.hh.

◆ lastIdx() [2/2]

template<class F >
virtual const uint & hp2D::hpAdaptiveSpace< F >::lastIdx ( ) const
inlinevirtual

Definition at line 93 of file hpAdaptiveSpace.hh.

◆ nelm() [1/2]

template<class F >
uint hp2D::hpAdaptiveSpace< F >::nelm ( )
inline

Definition at line 276 of file hpAdaptiveSpace.hh.

◆ nelm() [2/2]

template<class F >
uint hp2D::hpAdaptiveSpace< F >::nelm ( ) const
inlinevirtual

Returns the number of elements in the space.

Implements concepts::SpaceOnCells< F >.

Definition at line 256 of file hpAdaptiveSpace.hh.

◆ newElement_()

template<class F >
virtual Element< F > * hp2D::hpAdaptiveSpace< F >::newElement_ ( concepts::Cell2 cell,
ushort *  pMax,
concepts::TColumn< F > *  T0,
concepts::TColumn< F > *  T1 
) const
protectedpure virtual

Creates and returns an element for cell. Has to be implemented in the derived classes.

Implemented in hp2D::hpAdaptiveSpaceH1, and hp2D::hpAdaptiveSpaceL2.

◆ offset()

template<class F >
virtual uint hp2D::hpAdaptiveSpace< F >::offset ( ) const
inlinevirtual

Returns the offset.

Implements concepts::Subspace.

Definition at line 94 of file hpAdaptiveSpace.hh.

◆ prebuild() [1/2]

template<class F >
hpFull & hp2D::hpAdaptiveSpace< F >::prebuild ( )
inline

Definition at line 86 of file hpAdaptiveSpace.hh.

◆ prebuild() [2/2]

template<class F >
hpFull & hp2D::hpAdaptiveSpace< F >::prebuild ( ) const
inline

Definition at line 87 of file hpAdaptiveSpace.hh.

◆ rebuild()

template<class F >
void hp2D::hpAdaptiveSpace< F >::rebuild ( bool  sameIndices = false)

Rebuilds the mesh and the elements due to adjustment orders.

Parameters
sameIndicesIf true, the already existing indices (stored in the space pre builder) won't be cleared. That is useful for domain decomposition for example.

◆ recomputeShapefunctions()

template<class F >
virtual void hp2D::hpAdaptiveSpace< F >::recomputeShapefunctions ( )
pure virtual

Recompute shape functions, e.g. for other abscissas redefined through setIntegrationRule

Implemented in hp2D::hpAdaptiveSpaceH1, hp2D::hpAdaptiveSpaceL2, and hp2D::hpAdaptiveSpaceHCurl.

◆ scan() [1/2]

template<class F >
hpAdaptiveSpace< F >::Scan * hp2D::hpAdaptiveSpace< F >::scan ( )
inline

Definition at line 282 of file hpAdaptiveSpace.hh.

◆ scan() [2/2]

template<class F >
hpAdaptiveSpace< F >::Scan * hp2D::hpAdaptiveSpace< F >::scan ( ) const
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()

template<class F >
void hp2D::hpAdaptiveSpace< F >::set_bc ( const concepts::BoundaryConditions bc)
inline

Reset boundary conditions to bc

Definition at line 122 of file hpAdaptiveSpace.hh.

◆ setBuildEdgeDofs_()

template<class F >
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.

Parameters
bNew strategy

◆ setBuildInnerDofs_()

template<class F >
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.

Parameters
bNew strategy

◆ setBuildVertexDofs_()

template<class F >
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.

Parameters
bNew strategy

Member Data Documentation

◆ idxEdge_

template<class F >
uint hp2D::hpAdaptiveSpace< F >::idxEdge_
protected

Definition at line 158 of file hpAdaptiveSpace.hh.

◆ idxInner_

template<class F >
uint hp2D::hpAdaptiveSpace< F >::idxInner_
protected

Definition at line 158 of file hpAdaptiveSpace.hh.

◆ idxVtx_

template<class F >
uint hp2D::hpAdaptiveSpace< F >::idxVtx_
protected

Number of indices on entities, just for statistics.

Definition at line 158 of file hpAdaptiveSpace.hh.

◆ nelm_

template<class F >
uint hp2D::hpAdaptiveSpace< F >::nelm_
protected

Number of elements currently active in the mesh.

Definition at line 145 of file hpAdaptiveSpace.hh.

◆ offset_

template<class F >
uint hp2D::hpAdaptiveSpace< F >::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.

◆ prebuild_

template<class F >
hpFull* const hp2D::hpAdaptiveSpace< F >::prebuild_
protected

Mesh and degrees of freedoms.

Definition at line 137 of file hpAdaptiveSpace.hh.

◆ spc_

template<class F >
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 142 of file hpAdaptiveSpace.hh.

◆ zeroDim_

template<class F >
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 155 of file hpAdaptiveSpace.hh.


The documentation for this class was generated from the following file: