Class documentation of Concepts

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

#include <space.hh>

Inheritance diagram for hp3D::Space:
concepts::SpaceOnCells< Real > concepts::AdaptiveSpace< Real, concepts::AdaptiveAdjustP< 3 > > concepts::Space< F > concepts::OutputOperator

Public Types

typedef concepts::Scan< hp3D::Element< Real > > Scan
 
typedef hp3D::TraceSpace TraceSpaceT
 
typedef ElementWithCell< Real > type
 
typedef Scan< ElementWithCell< Real > > Scanner
 

Public Member Functions

 Space (concepts::Mesh3 &msh, uint l, uint p, concepts::BoundaryConditions *bc=0, concepts::CellConditions *cc=0)
 
 Space (const Space &spc)
 Copy constructor.
 
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.
 
virtual const concepts::BoundaryConditionsbc () const
 
uint dim ()
 
uint nelm ()
 
Scanscan ()
 
const concepts::BoundaryConditionsbc ()
 
void getPmax (const concepts::Hexahedron &cntr, ushort Pmax[3]) const
 
void setDim (uint dim)
 
virtual void adjust (const concepts::Element< Real > &elm, const concepts::AdaptiveAdjustP< 3 > &a)
 
Space rebuild ()
 
const std::unique_ptr< concepts::SMatrixBase< Real > > * getSmatrices (const concepts::Hex3dSubdivision *subdiv) const
 Returns the list of matrices matching the subdivision type subdiv.
 
void recomputeSmatrices (const Hexahedron *elm) const
 
void recomputeShapefunctions ()
 
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< 3 > &a)=0
 

Static Public Member Functions

Timing Interface

These functions are used to get timings from class internal computations. The values are stored in a user defined concepts::InOutParameters structure in different arrays (see setTimings). These arrays can be grouped into a table for easier postprocessing with

table.addMap(concepts::ResultsTable::DOUBLE, "jacobian", output);
table.addMap(concepts::ResultsTable::DOUBLE, "whole_sumfact", output);
std::ofstream ofs("table.gnuplot");
ofs << std::setprecision(20);
table.print<concepts::ResultsTable::GNUPLOT>(ofs);
static void setTimings (concepts::InOutParameters *timings)
 
static bool timings ()
 

Friends

class BuildDofsBase
 

Strategies to Build the Degrees of Freedom

void buildVertexDofs (const BuildDofsBase &b)
 
void buildEdgeDofs (const BuildDofsBase &b)
 
void buildFaceDofs (const BuildDofsBase &b)
 
void buildInnerDofs (const BuildDofsBase &b)
 
virtual std::ostream & info (std::ostream &os) const
 Returns information in an output stream.
 

Detailed Description

A 3D hp FEM space with continuous, picewise polynomial basis functions. Currently, only hexahedra 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(), buildFaceDofs() and buildInnerDofs() can be used to change the way the degrees of freedom on each part of each element are built.
Timing
This class is equiped with an interface to get timings of internal computations if compiled accordingly (see space.cc file), see setTimings() and timings().
Author
Philipp Frauenfelder, 2001
Test:

test::SpaceTest3D

test::DeadLock2

test::DeadLock3

Examples
hpFEM3d-EV.cc.

Definition at line 82 of file space.hh.

Member Typedef Documentation

◆ Scan

Definition at line 87 of file space.hh.

◆ Scanner

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

Definition at line 84 of file space.hh.

◆ TraceSpaceT

Definition at line 88 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()

hp3D::Space::Space ( concepts::Mesh3 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 conditions

Member Function Documentation

◆ adjust()

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

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

◆ bc() [1/2]

const concepts::BoundaryConditions * hp3D::Space::bc ( )
inline

Definition at line 507 of file space.hh.

◆ bc() [2/2]

const concepts::BoundaryConditions * hp3D::Space::bc ( ) const
inlinevirtual

Definition at line 487 of file space.hh.

◆ buildEdgeDofs()

void hp3D::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

◆ buildFaceDofs()

void hp3D::Space::buildFaceDofs ( const BuildDofsBase b)

Change the strategy how the degrees of freedom for the face are built. The default strategy is BuildFaceDofs. You can change this strategy any time you chose.

buildFaceDofs_ is reset with a clone of b.

Parameters
bNew strategy

◆ buildInnerDofs()

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

Change the strategy how the degrees of freedom for the interior are built. The default strategy is BuildInnerDofs. You can change this strategy any time you chose.

buildInnerDofs_ is reset with a clone of b.

Parameters
bNew strategy

◆ buildVertexDofs()

void hp3D::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

◆ dim() [1/2]

uint hp3D::Space::dim ( )
inline

Definition at line 492 of file space.hh.

◆ dim() [2/2]

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

Returns the dimension of the space.

Implements concepts::SpaceOnCells< Real >.

Definition at line 472 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.

◆ getPmax()

void hp3D::Space::getPmax ( const concepts::Hexahedron cntr,
ushort  Pmax[3] 
) const
inline

Definition at line 118 of file space.hh.

◆ info()

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

Returns information in an output stream.

Reimplemented from concepts::SpaceOnCells< Real >.

◆ nelm() [1/2]

uint hp3D::Space::nelm ( )
inline

Definition at line 497 of file space.hh.

◆ nelm() [2/2]

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

Returns the number of elements in the space.

Implements concepts::SpaceOnCells< Real >.

Definition at line 477 of file space.hh.

◆ rebuild()

Space hp3D::Space::rebuild ( )

Rebuilds the space after an adjustment with adjust.

Steps:

  • Calls meshAndPoly_ for every cell in the coarse mesh.
  • Creates the lists cellList_, faceList_, faceListEdg_, edgeList_, edgeListVtx_, and vertexList_ by calling createCellList_, createEdgFaceList_ and createVtxEdgList_ for every cell in the coarse mesh.
  • The lists which were created in the previous step are update and changed using FaceData::checkRelatedFaces, EdgeData::checkRelatedEdges, EdgeData::checkRelations, VertexData::checkRelations in order to find the supports of the basis functions (which have to be continuous).
  • Calls enrichElm_ for every cell in the coarse mesh.
  • Calls buildElements_ for every cell in the coarse mesh.

They all work recursively and rebuild the space.

At the end of this routine, the information in adj_, ctrl0_, ctrl1_, ctrl2_, cellList_, faceList_, faceListEdg_, edgeList_, edgeListVtx_ and vertexList_ is deleted. Just the list of elements in elm_ and ctrl3_ is kept.

See also
concepts::TMatrixBase for more information on T matrices and how they are stored
createCellList_
createVtxEdgList_
concepts::FaceData::checkRelatedFaces
concepts::EdgeData::checkRelatedEdges
concepts::EdgeData::checkRelations
concepts::VertexData::checkRelations
enrichElm_
buildElements_
Returns
Copy of the space on the old level
Examples
hpFEM3d-EV.cc.

◆ recomputeShapefunctions()

void hp3D::Space::recomputeShapefunctions ( )

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

◆ recomputeSmatrices()

void hp3D::Space::recomputeSmatrices ( const Hexahedron elm) const

Checks if the S matrices need to be recomputed and does so if necessary.

Parameters
elmElement which the S matrices are needed for (the polynomial degrees are important)

◆ scan() [1/2]

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

Definition at line 502 of file space.hh.

◆ scan() [2/2]

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

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

Implements concepts::SpaceOnCells< Real >.

Definition at line 482 of file space.hh.

◆ setTimings()

static void hp3D::Space::setTimings ( concepts::InOutParameters timings)
static

Sets the class to store the timing values in. Additionally, the timeCntr_ is reset to 0. This counter is used to fill in the values into the arrays listed below in subsequent calls. The following timings are taken and stored in timings:

  • subroutine meshAndPoly_ in meshAndPoly
  • creation of the lists of vertices, edges and faces in createTopologyLists
  • finding the support of faces modes in checkRelatedFaces
  • finding the support of edge modes in checkRelatedEdges
  • finding the support of vertex modes in checkRelatedVertices
  • enriching the degree of elements in enrichElements
  • building the elements and the T matrices in buildElements

◆ timings()

static bool hp3D::Space::timings ( )
static

Returns true if the class is able to do timings. The ability to do timings depends on a compiler switch in space.cc file.

Friends And Related Symbol Documentation

◆ BuildDofsBase

friend class BuildDofsBase
friend

Definition at line 85 of file space.hh.


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