hp2Dedge::Space Class Referenceabstract
A 2D hp FEM space of edge elements with piecewise polynomial basis functions with two components, where the tangential component is continuous Currently, only quadrilaterials and conforming meshes are possible. More...
#include <space.hh>
Public Types | |
typedef concepts::Scan< hp2D::Element< Real > > | Scan |
typedef Scan< ElementWithCell< Real > > | Scanner |
typedef ElementWithCell< Real > | type |
Public Member Functions | |
virtual void | adjust (const concepts::Element< Real > &elm, const concepts::AdaptiveAdjustP< 2 > &a) |
virtual void | adjust (const Element< Real > &elm, const concepts::AdaptiveAdjustP< 2 > &a)=0 |
Adjusts the space in the next rebuild step for this element. More... | |
concepts::BoundaryConditions * | boundary () |
uint | dim () |
Returns the dimension of the space. More... | |
uint | dim () const |
virtual uint | getOutputDimension () const |
virtual uint | getOutputDimension () const |
Returns the default output dimension, when we consider plotting a real-valued operator on this space. More... | |
concepts::Scan< const concepts::Quad > * | interScan () |
scanner over the intermediate cells More... | |
concepts::Scan< const concepts::Quad > * | interScan () const |
scanner over the intermediate cells More... | |
uint | nelm () |
Returns the number of elements in the space. More... | |
uint | nelm () const |
void | rebuild () |
Rebuilds the space. More... | |
void | recomputeShapefunctions () |
Recompute shape functions, e.g. More... | |
Scan * | scan () |
scanner over the cells of the coarsest mesh More... | |
Scan * | scan () const |
scanner over the cells of the coarsest mesh More... | |
Space (concepts::Mesh2 &msh, uint l, uint p, concepts::BoundaryConditions *bc=0, bool trunk=false) | |
Constructor. More... | |
virtual | ~Space () |
Protected Member Functions | |
virtual std::ostream & | info (std::ostream &os) const |
Private Member Functions | |
bool | activeCell_ (concepts::Cell &cell) |
Checks if a cell is in active region. More... | |
concepts::TColumn< Real > * | buildEdge_ (concepts::TColumn< Real > *T1, const concepts::Quad &cntr, const uint *nn) |
Builds the T columns for the edge degrees of freedom. More... | |
void | buildElements_ (concepts::Quad2d &cell) |
Creates the elements and their T matrices. More... | |
concepts::TColumn< Real > * | buildInterior_ (concepts::TColumn< Real > *T1, const concepts::Quad &cntr, const uint *nn) |
Builds the T columns for the interior degrees of freedom. More... | |
void | buildTColumns_ (const concepts::Quad &cntr, ushort *Pmax, concepts::TColumn< Real > *T0=0) |
Builds the T columns, stores them together with the neccessary polynomial degrees in a list T_. More... | |
void | computePmax_ (const concepts::Connector2 &cntr, ushort Pmax[2]) const |
Computes the maximal polynomial degree of cell in each direction. More... | |
void | createCellList_ (const concepts::Connector &cntr, const concepts::CellData *father) |
Initially fills cellList_ (recursively) More... | |
void | createEdgList_ (const concepts::Cell2 &cell) |
Initially fills edgeList_ . More... | |
void | deactivate_ (concepts::Edge &edg) |
void | deactivate_ (concepts::Vertex &vtx) |
void | edgeOrientation_ (const concepts::Connector2 &cntr, const uint i, uint &pIndex) const |
Helps distributing the polynomial degree to the edges. More... | |
void | enforceBC_ (concepts::Quad2d &cell) |
Enforce Dirichlet boundary conditions. More... | |
void | enrichElm_ (const concepts::Quad2d &cell, int *p) |
Enriches the polynomial degrees. More... | |
void | matlabstatus_ () |
void | meshAndPoly_ (concepts::Quad2d &cell, concepts::Level< 2 > &L, int *P) |
Adjusts the mesh and the polynomial degree. More... | |
void | minimumRule_ (const concepts::Connector2 &cntr, const concepts::Connector1 &edge) |
Used to enforce the minimum rule. More... | |
void | nonactiveRegion_ () |
Set that cells in nonactive region to passive. More... | |
void | recomputeSmatrices_ (const ushort *p, const uint *nn) |
Checks if the S matrices need to be recomputed and does so if necessary. More... | |
void | status_ () |
Gives the cells and edges with given polynomial degree (for debugging) More... | |
Private Attributes | |
concepts::DynArray< concepts::AdaptiveAdjustP< 2 > > | adj_ |
Hash table of the adjustment information of the elements. More... | |
concepts::BoundaryConditions * | bc_ |
Boundary conditions. More... | |
std::map< uint, concepts::CellData > | cellList_ |
List of cells. More... | |
concepts::DynArray< concepts::AdaptiveControl<> > | ctrl0_ |
Hash table of the control information for the vertices. More... | |
concepts::DynArray< concepts::AdaptiveControlP< 1 > > | ctrl1_ |
Hash table of the control information for the edges. More... | |
std::unordered_map< uint, concepts::AdaptiveControlP< 2 > > | ctrl2_ |
Hash table of the control information for the 2D elements. More... | |
uint | dim_ |
Dimension of the FE space. More... | |
std::map< uint, concepts::EdgeData > | edgeList_ |
List of edges. More... | |
concepts::Joiner< hp2D::Element< Real > *, 1 > * | elm_ |
Linked list of the elements. More... | |
concepts::Joiner< const concepts::Quad *, 1 > * | interCells_ |
std::set< uint > | interEdges_ |
concepts::Mesh2 & | msh_ |
Mesh. More... | |
uint | nelm_ |
Number of elements currently active in the mesh. More... | |
bool | rebuild_ |
If true: the elements have to be rebuilt. More... | |
std::unique_ptr< concepts::SMatrix1D > | S1left_n_ |
std::unique_ptr< concepts::SMatrix1D > | S1left_t_ |
S matrices in 1D. More... | |
std::unique_ptr< concepts::SMatrix1D > | S1right_n_ |
std::unique_ptr< concepts::SMatrix1D > | S1right_t_ |
std::unique_ptr< concepts::SMatrixBase< Real > > | Smatrices2H_ [2] |
S matrices for horizontal subdivision. More... | |
std::unique_ptr< concepts::SMatrixBase< Real > > | Smatrices2H_X_ [2] |
S matrices for tangential and normal component for different subdivisions. More... | |
std::unique_ptr< concepts::SMatrixBase< Real > > | Smatrices2H_Y_ [2] |
std::unique_ptr< concepts::SMatrixBase< Real > > | Smatrices2V_ [2] |
S matrices for vertical subdivision. More... | |
std::unique_ptr< concepts::SMatrixBase< Real > > | Smatrices2V_X_ [2] |
std::unique_ptr< concepts::SMatrixBase< Real > > | Smatrices2V_Y_ [2] |
std::unique_ptr< concepts::SMatrixBase< Real > > | Smatrices4_ [4] |
S matrices for subdivision into 4 quads. More... | |
concepts::TColumnSet< Real, 2 > | T_ |
List of TColumns (for the member of the space cells) More... | |
bool | trunk_ |
Build trunk space. More... | |
Detailed Description
A 2D hp FEM space of edge elements with piecewise polynomial basis functions with two components, where the tangential component is continuous Currently, only quadrilaterials and conforming meshes are possible.
Member Typedef Documentation
◆ Scan
typedef concepts::Scan<hp2D::Element<Real> > hp2Dedge::Space::Scan |
◆ Scanner
|
inherited |
◆ type
|
inherited |
Constructor & Destructor Documentation
◆ Space()
hp2Dedge::Space::Space | ( | concepts::Mesh2 & | msh, |
uint | l, | ||
uint | p, | ||
concepts::BoundaryConditions * | bc = 0 , |
||
bool | trunk = false |
||
) |
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
-
msh The domain of interest partitioned into a mesh. l Level of refinement p Degree of the polynomials to be used. bc Boundary conditions trunk Create trunk space ie., use the the rules p+q <= pIntMax + 1
in the interior instead of allowing allp, q
combinations.
◆ ~Space()
|
virtual |
Member Function Documentation
◆ activeCell_()
|
private |
Checks if a cell is in active region.
◆ adjust() [1/2]
|
virtual |
◆ adjust() [2/2]
|
pure virtualinherited |
Adjusts the space in the next rebuild step for this element.
◆ boundary()
|
inline |
◆ buildEdge_()
|
private |
Builds the T columns for the edge degrees of freedom.
◆ buildElements_()
|
private |
Creates the elements and their T matrices.
This routine is called recursively until the finest level is reached. With the TColumns and polynomial degrees, which are taken from T_, the elements are created and the T matrix is created on the finest level.
◆ buildInterior_()
|
private |
Builds the T columns for the interior degrees of freedom.
◆ buildTColumns_()
|
private |
Builds the T columns, stores them together with the neccessary polynomial degrees in a list T_.
This routine is called recursively until the finest level is
reached. If there have degrees of freedom to be assigned on higher level, the according T columns are adapted using the S matrices. On the finest level, the T columns and polynomial degrees are stored.
- Parameters
-
cntr The current cell (geometric) Pmax Request for maximal polynomial degree, array with 2 entries T0 Precomputed T columns which belong to a parent of the cell
- Precondition
Pmax
is an array of 2 integers
◆ computePmax_()
|
private |
Computes the maximal polynomial degree of cell
in each direction.
Takes into account higher polynomial degrees on faces and edges compared to the interior.
◆ createCellList_()
|
private |
Initially fills cellList_
(recursively)
◆ createEdgList_()
|
private |
Initially fills edgeList_
.
◆ deactivate_() [1/2]
|
private |
◆ deactivate_() [2/2]
|
private |
◆ dim() [1/2]
|
inlinevirtual |
Returns the dimension of the space.
Implements concepts::SpaceOnCells< Real >.
◆ dim() [2/2]
◆ edgeOrientation_()
|
private |
Helps distributing the polynomial degree to the edges.
- Parameters
-
cntr Connector i Index of the face [0..5] pIndex Return value, the index of the polynomial degree of this edge in the array of the element
◆ enforceBC_()
|
private |
Enforce Dirichlet boundary conditions.
This routine is called by meshAndPoly_
on every cell.
- Parameters
-
cell Cell
◆ enrichElm_()
|
private |
Enriches the polynomial degrees.
This enrichement is necessary for the edges to be able to create conforming global basis functions.
In refined cells, some of the small edges might have a polynomial degree which is too low to represent a part of a basis function which is defined on a larger element.
To achieve this, the cells are traversed top down until the level of the elements is reached. During the traversal, the needed polynomial degree for the small elements is computed and enforced on the element level (only on the edges).
- Precondition
p
is an array of 6 integers
◆ getOutputDimension() [1/2]
|
inlinevirtual |
◆ getOutputDimension() [2/2]
|
inlinevirtualinherited |
◆ info()
|
protectedvirtual |
Reimplemented from concepts::SpaceOnCells< Real >.
◆ interScan() [1/2]
|
inline |
◆ interScan() [2/2]
|
inline |
◆ matlabstatus_()
|
private |
◆ meshAndPoly_()
|
private |
Adjusts the mesh and the polynomial degree.
On the old mesh, the adjustment information is taken. This leads to mesh refinements or coarsening and a certain polynomial degree distribution.
The polynomial degree is fixed on the finest level (where the elements are eventually built) and given to the coarser levels (for edges and the interior of the cell). This is done bottom up.
Finally, the boundary conditions are enforced on every cell using enforceBC_
@param cell Cell
- Parameters
-
L The desired level P The desired polynomial degree
- Precondition
P
is an array of 3 integers
- See also
- enforceBC_
◆ minimumRule_()
|
private |
Used to enforce the minimum rule.
The minimum rule states that the polynomial degree on a edge has to be the minimum of the adjacent elements.
This routine recursively calls itself and asserts that all the elements adjacent to edge
enforce their polynomial degree on edge
. This is done if the cell
is member of the space. Otherwise, minimumRule_
is called with the children of cell
.
◆ nelm() [1/2]
|
inlinevirtual |
Returns the number of elements in the space.
Implements concepts::SpaceOnCells< Real >.
◆ nelm() [2/2]
◆ nonactiveRegion_()
|
private |
Set that cells in nonactive region to passive.
A whole region can be deactivated by setting the attribute of the cells in the region to be of Dirichlet boundary condition. That not includes the edges of the region.
If the edges of the region can be deactivated by usual setting of Dirichlet boundary condition.
◆ rebuild()
void hp2Dedge::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.
◆ recomputeShapefunctions()
void hp2Dedge::Space::recomputeShapefunctions | ( | ) |
Recompute shape functions, e.g.
for other abscissas redefined through setIntegrationRule
◆ recomputeSmatrices_()
|
private |
Checks if the S matrices need to be recomputed and does so if necessary.
- Parameters
-
p polynomial degrees of the element nn maximal polynomial degree (in x- and y-direction) for the two vector components, i.e. array with 4 entries, 1st and 2nd are for first vector component, 3rd and 4th are for the second vector component.
◆ scan() [1/2]
|
inlinevirtual |
scanner over the cells of the coarsest mesh
Implements concepts::SpaceOnCells< Real >.
◆ scan() [2/2]
|
inline |
◆ status_()
|
private |
Gives the cells and edges with given polynomial degree (for debugging)
Member Data Documentation
◆ adj_
|
private |
◆ bc_
|
private |
◆ cellList_
|
private |
◆ ctrl0_
|
private |
◆ ctrl1_
|
private |
◆ ctrl2_
|
private |
◆ dim_
|
private |
◆ edgeList_
|
private |
◆ elm_
|
private |
◆ interCells_
|
private |
◆ interEdges_
◆ msh_
|
private |
◆ nelm_
|
private |
◆ rebuild_
|
private |
◆ S1left_n_
|
private |
◆ S1left_t_
|
private |
◆ S1right_n_
|
private |
◆ S1right_t_
|
private |
◆ Smatrices2H_
|
private |
S matrices for horizontal subdivision.
- See also
- concepts::Quad2dSubdiv2H
◆ Smatrices2H_X_
|
private |
◆ Smatrices2H_Y_
|
private |
◆ Smatrices2V_
|
private |
S matrices for vertical subdivision.
- See also
- concepts::Quad2dSubdiv2V
◆ Smatrices2V_X_
|
private |
◆ Smatrices2V_Y_
|
private |
◆ Smatrices4_
|
private |
S matrices for subdivision into 4 quads.
- See also
- concepts::Quad2dSubdiv4
◆ T_
|
private |
◆ trunk_
The documentation for this class was generated from the following file:
- hp2Dedge/space.hh