hp2D::BuildInnerDofs Class Reference
Responsible to build the inner degrees of freedom in a space. More...
#include <buildInnerDofs.hh>
Public Member Functions | |
BuildInnerDofs () | |
Default constructor. More... | |
BuildInnerDofs (Space &spc) | |
Constructor. More... | |
virtual BuildInnerDofs * | clone (Space *spc=0) const |
Virtual copy constructor with a twist. More... | |
virtual void | operator() (concepts::Quad &cntr, concepts::TColumn< Real > *&T1, const uint nn[2]) |
Builds the degrees of freedom. More... | |
Space * | space () |
Returns the space. More... | |
virtual bool | trunk (uint p, uint q, const ushort P[2]) |
Trunk space indicator function. More... | |
Protected Member Functions | |
void | computePmax_ (const concepts::Quad &cntr, ushort Pmax[2]) const |
Computes maximal polynomial Pmax degree in cntr in tensor form. More... | |
concepts::AdaptiveControl & | ctrl0_ (uint idx) |
Returns vertex tag of vertex with key idx . More... | |
concepts::AdaptiveControlP< 1 > & | ctrl1_ (uint idx) |
Returns edge tag of edge with key idx . More... | |
concepts::AdaptiveControlP< 2 > & | ctrl2_ (uint idx) |
Returns face tag of face with key idx . More... | |
void | deactivate_ (const concepts::Edge &edg) |
Deactivates the children of the edge edg (including the middle vertex). More... | |
void | deactivate_ (const concepts::Vertex &vtx) |
Deactivates the children of the vertex vtx . More... | |
uint & | dim_ () |
Returns a reference to the dimension of the space. More... | |
std::map< uint, concepts::EdgeData >::const_iterator | edgeListEnd () const |
Returns the end of the list with edge data. More... | |
std::map< uint, concepts::EdgeData >::const_iterator | edgeListFind (uint idx) const |
Returns the iterator to the edge data of the edge with key idx . More... | |
std::map< uint, concepts::VertexData >::const_iterator | vertexListEnd () const |
Returns the end of the list with vertex data. More... | |
std::map< uint, concepts::VertexData >::const_iterator | vertexListFind (uint idx) const |
Returns the iterator to the vertex data of the vertex with key idx . More... | |
Protected Attributes | |
Space * | spc_ |
Space to build the vertex degrees of freedom from. More... | |
Detailed Description
Responsible to build the inner degrees of freedom in a space.
A call to the application operator builds the T columns for the inner modes of a given quad.
If you want to change the way this is done, derive from this class and overwrite the application operator. The access to the internal data of the space (which is needed) is provided through the protected member functions of BuildDofsBase (it is a friend of Space).
- Trunk Polynomial Spaces
- Using this class, all degrees of freedom of the face are built (full tensor product space). It is very simply to change this behaviour in a derived class as the truncation function for the degrees of freedom is separated into trunk(). BuildInnerDofsLinTrunk is an example for a truncated local polynomial space (it is the default for building internal degrees of freedom).
- BuildInnerDofsHypTrunk is another example. The plot below compares the relative energy error versus degrees of freedom for three different internal degrees of freedom polynomial spaces. The plot was done with the hpFEM2d tutorial program by exchanging the strategy for the internal degrees of freedom right after creating the Space. The result at an error of 1.7e-6 needs the following number of degrees of freedom:
Space Degrees of Freedom Relative Energy Error Full tensor product 4955 1.76e-6 Linear trunk 2570 1.77e-6 Hyperbolic trunk 1841 1.79e-6
Definition at line 57 of file buildInnerDofs.hh.
Constructor & Destructor Documentation
◆ BuildInnerDofs() [1/2]
|
inline |
Default constructor.
Definition at line 60 of file buildInnerDofs.hh.
◆ BuildInnerDofs() [2/2]
|
inline |
Constructor.
- Parameters
-
spc Space to build the inner degrees of freedom from
Definition at line 64 of file buildInnerDofs.hh.
Member Function Documentation
◆ clone()
|
virtual |
Virtual copy constructor with a twist.
If a copy of a space is created, the strategies to build the degrees of freedom of the copy should also reference the copy and not the initial space. This is done by giving the argument spc
to clone.
- Parameters
-
spc Space to work on for the return value. If set to 0, spc_
is used.
Implements hp2D::BuildDofsBase.
Reimplemented in hp2D::BuildInnerDofsHypTrunk, and hp2D::BuildInnerDofsLinTrunk.
◆ computePmax_()
|
inlineprotectedinherited |
Computes maximal polynomial Pmax
degree in cntr
in tensor form.
Definition at line 142 of file buildDofsBase.hh.
◆ ctrl0_()
|
inlineprotectedinherited |
Returns vertex tag of vertex with key idx
.
Definition at line 93 of file buildDofsBase.hh.
◆ ctrl1_()
|
inlineprotectedinherited |
Returns edge tag of edge with key idx
.
Definition at line 98 of file buildDofsBase.hh.
◆ ctrl2_()
|
inlineprotectedinherited |
Returns face tag of face with key idx
.
Definition at line 103 of file buildDofsBase.hh.
◆ deactivate_() [1/2]
|
inlineprotectedinherited |
Deactivates the children of the edge edg
(including the middle vertex).
Definition at line 137 of file buildDofsBase.hh.
◆ deactivate_() [2/2]
|
inlineprotectedinherited |
Deactivates the children of the vertex vtx
.
Definition at line 132 of file buildDofsBase.hh.
◆ dim_()
|
inlineprotectedinherited |
Returns a reference to the dimension of the space.
Definition at line 81 of file buildDofsBase.hh.
◆ edgeListEnd()
|
inlineprotectedinherited |
Returns the end of the list with edge data.
Definition at line 127 of file buildDofsBase.hh.
◆ edgeListFind()
|
inlineprotectedinherited |
Returns the iterator to the edge data of the edge with key idx
.
Definition at line 121 of file buildDofsBase.hh.
◆ operator()()
|
virtual |
Builds the degrees of freedom.
- Parameters
-
cntr Hex which vertices should be considered T1 New T columns created for the degrees of freedom in the vertices
Implements hp2D::BuildDofsBase.
◆ space()
|
inlineinherited |
Returns the space.
Definition at line 60 of file buildDofsBase.hh.
◆ trunk()
|
virtual |
Trunk space indicator function.
For each degree of freedom, this function is called to find out if it should be built or not. If the return value is true
, the degree of freedom is built, otherwise it is not.
The default behaviour of this function is to return true
. Overwrite it if you want to have a trunk space (e.g. as in BuildInnerDofsLinTrunk).
- Parameters
-
p Polynomial degree in first direction of current degree of freedom q Polynomial degree in second direction of current degree of freedom P Maximal polynomial degree in the interior
Reimplemented in hp2D::BuildInnerDofsHypTrunk, and hp2D::BuildInnerDofsLinTrunk.
◆ vertexListEnd()
|
inlineprotectedinherited |
Returns the end of the list with vertex data.
Definition at line 115 of file buildDofsBase.hh.
◆ vertexListFind()
|
inlineprotectedinherited |
Returns the iterator to the vertex data of the vertex with key idx
.
Definition at line 109 of file buildDofsBase.hh.
Member Data Documentation
◆ spc_
|
protectedinherited |
Space to build the vertex degrees of freedom from.
Definition at line 90 of file buildDofsBase.hh.
The documentation for this class was generated from the following file:
- hp2D/buildInnerDofs.hh