Class documentation of Concepts

Loading...
Searching...
No Matches
hp2D::Space Class Referenceabstract

#include <space.hh>

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

Public Types

typedef concepts::Scan< hp2D::Element< Real > > Scan
 
typedef ElementWithCell< Real > type
 
typedef Scan< ElementWithCell< Real > > Scanner
 

Public Member Functions

 Space (concepts::Mesh2 &msh, uint l, uint p, concepts::BoundaryConditions *bc=0)
 
 Space (const Space &spc)
 
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.
 
ScanconstScan () const
 
uint dim ()
 
uint nelm ()
 
Scanscan ()
 
virtual void adjust (const concepts::Element< Real > &elm, const concepts::AdaptiveAdjustP< 2 > &a)
 
Space rebuild ()
 
virtual uint getOutputDimension () const
 Returns the default output dimension, when we consider plotting a real-valued operator on this space.
 
virtual void adjust (const Element< Real > &elm, const concepts::AdaptiveAdjustP< 2 > &a)=0
 

Friends

class BuildDofsBase
 

Strategies to Build the Degrees of Freedom

void buildVertexDofs (const BuildDofsBase &b)
 
void buildEdgeDofs (const BuildDofsBase &b)
 
void buildInnerDofs (const BuildDofsBase &b)
 
uint connectedIdx (const concepts::Attribute &a) const
 Gives the number of connected dofs for one attribute.
 
void recomputeShapefunctions ()
 
virtual std::ostream & info (std::ostream &os) const
 Returns information in an output stream.
 

Detailed Description

A 2D hp FEM space with continuous, piecewise polynomial basis functions. Currently, only hexahedrons and conforming meshes are possible.

Adaptivity
You can adaptively refine this space by using adjust() on some elements to refine them or increase their polynomial degree. Please note that these extensions can be locally varying (ie. non-uniform) and anisotropic.
Trunk Space
Classically, the whole tensor product polynomial space is used on each element to build the degress of freedom. However, a considerable amount of degrees of freedom can be saved, when only a trunk of this space is used. In fact, only very little is lost in accuracy while the gain in terms of degrees of freedom is noteworthy. The methods buildVertexDofs(), buildEdgeDofs() and buildInnerDofs() can be used to change the way the degrees of freedom on each part of each element are built.
Author
Philipp Frauenfelder, 2001
Test:
test::SpaceTest2D
Examples
BGT_0.cc, hpFEM2d-simple.cc, and hpFEM2d.cc.

Definition at line 85 of file space.hh.

Member Typedef Documentation

◆ Scan

Definition at line 92 of file space.hh.

◆ Scanner

typedef Scan<ElementWithCell<Real > > concepts::SpaceOnCells< Real >::Scanner
inherited

Definition at line 84 of file space.hh.

◆ type

typedef ElementWithCell<Real > concepts::SpaceOnCells< Real >::type
inherited

Definition at line 83 of file space.hh.

Constructor & Destructor Documentation

◆ Space() [1/2]

hp2D::Space::Space ( concepts::Mesh2 msh,
uint  l,
uint  p,
concepts::BoundaryConditions bc = 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

◆ Space() [2/2]

hp2D::Space::Space ( const Space spc)

Copy constructor. Copies mesh, boundary conditions and ctrl2_ (information about refinements and polynomial degrees of the elements).

Member Function Documentation

◆ adjust()

virtual void concepts::AdaptiveSpace< Real , concepts::AdaptiveAdjustP< 2 > >::adjust ( const Element< Real > &  elm,
const concepts::AdaptiveAdjustP< 2 > &  a 
)
pure virtualinherited

Adjusts the space in the next rebuild step for this element.

◆ buildEdgeDofs()

void hp2D::Space::buildEdgeDofs ( const BuildDofsBase b)

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

◆ buildInnerDofs()

void hp2D::Space::buildInnerDofs ( const BuildDofsBase b)

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

◆ buildVertexDofs()

void hp2D::Space::buildVertexDofs ( const BuildDofsBase b)

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

◆ constScan()

Space::Scan * hp2D::Space::constScan ( ) const
inline

Returns constant scanner over elements of last build, In contrast to scan(), this method also workes, if the space would need a rebuild, * i.e. rebuild is true.

Definition at line 408 of file space.hh.

◆ dim() [1/2]

uint hp2D::Space::dim ( )
inline

Definition at line 412 of file space.hh.

◆ dim() [2/2]

uint hp2D::Space::dim ( ) const
inlinevirtual

Returns the dimension of the space.

Implements concepts::SpaceOnCells< Real >.

Examples
BGT_0.cc, and hpFEM2d.cc.

Definition at line 393 of file space.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.

◆ info()

virtual std::ostream & hp2D::Space::info ( std::ostream &  os) const
protectedvirtual

Returns information in an output stream.

Reimplemented from concepts::SpaceOnCells< Real >.

◆ nelm() [1/2]

uint hp2D::Space::nelm ( )
inline

Definition at line 417 of file space.hh.

◆ nelm() [2/2]

uint hp2D::Space::nelm ( ) const
inlinevirtual

Returns the number of elements in the space.

Implements concepts::SpaceOnCells< Real >.

Definition at line 398 of file space.hh.

◆ rebuild()

Space hp2D::Space::rebuild ( )

Rebuilds the space. First the old list of Finite Elements in the space is removed (not the elements in the topology!). Then the control information for the vertices, edges and faces is cleared (the information on the 2D elements is retained). For every cell in the original mesh, rebuild0_ and rebuild1_ are called. From the mesh, they build the space and store the elements in elm_. An essential part of the generated information are the T matrices. They describe how the local shape functions are glued together to form the global shape functions.

rebuild0_ marks the elements with the right values and rebuild1_ really does the work.

See also
TMatrix for more information on T matrices and how they are stored.
Returns
Copy of the space on the old level
Examples
BGT_0.cc, hpFEM2d-simple.cc, and hpFEM2d.cc.

◆ recomputeShapefunctions()

void hp2D::Space::recomputeShapefunctions ( )

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

Examples
BGT_0.cc.

◆ scan() [1/2]

Space::Scan * hp2D::Space::scan ( )
inline

Definition at line 422 of file space.hh.

◆ scan() [2/2]

Space::Scan * hp2D::Space::scan ( ) const
inlinevirtual

Returns a scanner to iterate over the elements of the space.

Implements concepts::SpaceOnCells< Real >.

Definition at line 403 of file space.hh.

Friends And Related Symbol Documentation

◆ BuildDofsBase

friend class BuildDofsBase
friend

Definition at line 90 of file space.hh.


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