LehrFEM++ 1.0.0
A simple Finite Element Library for teaching
|
Quadratic Lagrangian finite element on a quadrilateral reference element. More...
#include <lf/uscalfe/uscalfe.h>
Public Member Functions | |
FeLagrangeO2Quad (const FeLagrangeO2Quad &)=default | |
FeLagrangeO2Quad (FeLagrangeO2Quad &&) noexcept=default | |
FeLagrangeO2Quad & | operator= (const FeLagrangeO2Quad &)=default |
FeLagrangeO2Quad & | operator= (FeLagrangeO2Quad &&) noexcept=default |
FeLagrangeO2Quad ()=default | |
~FeLagrangeO2Quad () override=default | |
base::RefEl | RefEl () const override |
Tells the type of reference cell underlying the parametric finite element. More... | |
unsigned | Degree () const override |
Quadratic Lagrangian finite elements sport polynomials of degree 2. More... | |
size_type | NumRefShapeFunctions () const override |
Nine local shape functions are associated with a quadrilateral cell. More... | |
size_type | NumRefShapeFunctions (dim_t codim) const override |
One shape function is attached to each node and edge of the quadrilateral. One interior shape function. More... | |
size_type | NumRefShapeFunctions (dim_t codim, sub_idx_t) const override |
One shape function is attached to each node and each edge of the quadrilateral. One interior shape function. More... | |
Eigen::Matrix< SCALAR, Eigen::Dynamic, Eigen::Dynamic > | EvalReferenceShapeFunctions (const Eigen::MatrixXd &refcoords) const override |
Point evaluation of reference local shape functions in unit square. More... | |
Eigen::Matrix< SCALAR, Eigen::Dynamic, Eigen::Dynamic > | GradientsReferenceShapeFunctions (const Eigen::MatrixXd &refcoords) const override |
Point evaluation of gradient of reference shape functions for quadratic Lagrangian finite elements on quadrilateral cells. More... | |
Eigen::MatrixXd | EvaluationNodes () const override |
Evaluation nodes are the vertices, the midpoints of the edges and the center of the quadrilateral. More... | |
size_type | NumEvaluationNodes () const override |
Nine evaluation nodes, same as the number of local shape functions. More... | |
![]() | |
virtual | ~ScalarReferenceFiniteElement ()=default |
virtual base::RefEl | RefEl () const =0 |
Tells the type of reference cell underlying the parametric finite element. More... | |
virtual unsigned int | Degree () const =0 |
Request the maximal polynomial degree of the basis functions in this finite element. More... | |
dim_t | Dimension () const |
Returns the spatial dimension of the reference cell. More... | |
virtual size_type | NumRefShapeFunctions () const |
Total number of reference shape functions associated with the reference cell. More... | |
virtual size_type | NumRefShapeFunctions (dim_t codim) const |
The number of interior reference shape functions for sub-entities of a particular co-dimension. More... | |
virtual size_type | NumRefShapeFunctions (dim_t codim, sub_idx_t subidx) const =0 |
The number of interior reference shape functions for every sub-entity. More... | |
virtual Eigen::Matrix< SCALAR, Eigen::Dynamic, Eigen::Dynamic > | EvalReferenceShapeFunctions (const Eigen::MatrixXd &refcoords) const =0 |
Evaluation of all reference shape functions in a number of points. More... | |
virtual Eigen::Matrix< SCALAR, Eigen::Dynamic, Eigen::Dynamic > | GradientsReferenceShapeFunctions (const Eigen::MatrixXd &refcoords) const =0 |
Computation of the gradients of all reference shape functions in a number of points. More... | |
virtual Eigen::MatrixXd | EvaluationNodes () const =0 |
Returns reference coordinates of "evaluation nodes" for evaluation of parametric degrees of freedom, nodal interpolation in the simplest case. More... | |
virtual size_type | NumEvaluationNodes () const =0 |
Tell the number of evaluation (interpolation) nodes. More... | |
virtual Eigen::Matrix< SCALAR, 1, Eigen::Dynamic > | NodalValuesToDofs (const Eigen::Matrix< SCALAR, 1, Eigen::Dynamic > &nodvals) const |
Computes the linear combination of reference shape functions matching function values at evaluation nodes. More... | |
Static Private Attributes | |
static const FeLagrangeO2Segment< SCALAR > | krsf_segment_ |
static const Eigen::Matrix< int, 9, 2 > | ksegment_to_quad_mapping_ |
Additional Inherited Members | |
![]() | |
using | Scalar = SCALAR |
The underlying scalar type. More... | |
![]() | |
ScalarReferenceFiniteElement ()=default | |
ScalarReferenceFiniteElement (const ScalarReferenceFiniteElement &)=default | |
ScalarReferenceFiniteElement (ScalarReferenceFiniteElement &&) noexcept=default | |
ScalarReferenceFiniteElement & | operator= (const ScalarReferenceFiniteElement &)=default |
ScalarReferenceFiniteElement & | operator= (ScalarReferenceFiniteElement &&) noexcept=default |
![]() | |
template<class SCALAR > | |
void | PrintInfo (std::ostream &o, const ScalarReferenceFiniteElement< SCALAR > &srfe, unsigned int ctrl=0) |
Print information about a ScalarReferenceFiniteElement to the given stream. More... | |
template<typename SCALAR > | |
std::ostream & | operator<< (std::ostream &o, const ScalarReferenceFiniteElement< SCALAR > &fe_desc) |
Stream output operator: just calls the ScalarReferenceFiniteElement::print() method. More... | |
Quadratic Lagrangian finite element on a quadrilateral reference element.
This is a specialization of ScalarReferenceFiniteElement. Refer to its documentation.
The shape functions are computed by a tensor product construction: The shape function associated with the interpolation node \( \mathbf{p} =(x_j,y_l)\) is computed as
\[ \hat{b}^{\mathbf{p}}(x_1,x_2)=\hat{b}^j(x_1)*\hat{b}^l(x_2) \]
Where \( \hat{b}^j\) and \( \hat{b}^l \) are the quadratic Lagrangian shape functions on the reference line segment associated to the interpolation nodes \( x_j \) and \( y_l \).
The first four shape functions are associated with the vertices, the next four with the edges of the quadrilateral. The last shape function is an interior shape function.
|
default |
|
defaultnoexcept |
|
default |
|
overridedefault |
|
inlineoverridevirtual |
Quadratic Lagrangian finite elements sport polynomials of degree 2.
Implements lf::fe::ScalarReferenceFiniteElement< SCALAR >.
|
inlineoverridevirtual |
Point evaluation of reference local shape functions in unit square.
The nine local shape functions for quadratic Lagrangian finite elements on the unit square can be obtained by forming tensor product of the three local shape functions on the unit interval. This entails taking into account the numbering of the local shape functions: LSF 0-3 belong to the four corners, LSF 4-7 belong to the edges, LSF 8 belongs to the cell. This complies with the numbering convention for local shape functions as explained in Paragraph 2.7.4.11, Example 2.7.4.12.
Here the local shape functions are chosen as cardinal basis of the space of tensor product polynomials of degree 2 with respect to the following nine evaluation nodes: the four corners of the unit square, the four midpoints of its edges, and its center of gravity, see Figure 117.
Implements lf::fe::ScalarReferenceFiniteElement< SCALAR >.
Definition at line 779 of file lagr_fe.h.
References lf::uscalfe::FeLagrangeO2Quad< SCALAR >::krsf_segment_, and lf::uscalfe::FeLagrangeO2Quad< SCALAR >::ksegment_to_quad_mapping_.
|
inlineoverridevirtual |
Evaluation nodes are the vertices, the midpoints of the edges and the center of the quadrilateral.
Location and numbering of evaluation nodes:
Implements lf::fe::ScalarReferenceFiniteElement< SCALAR >.
|
inlineoverridevirtual |
Point evaluation of gradient of reference shape functions for quadratic Lagrangian finite elements on quadrilateral cells.
Gradients are returned packed in the rows of a 9 x 2P matrix, where P is the number of evaluation points passed as a 2 x P matrix.
Implements lf::fe::ScalarReferenceFiniteElement< SCALAR >.
Definition at line 811 of file lagr_fe.h.
References lf::uscalfe::FeLagrangeO2Quad< SCALAR >::krsf_segment_, and lf::uscalfe::FeLagrangeO2Quad< SCALAR >::ksegment_to_quad_mapping_.
|
inlineoverridevirtual |
Nine evaluation nodes, same as the number of local shape functions.
Implements lf::fe::ScalarReferenceFiniteElement< SCALAR >.
Definition at line 877 of file lagr_fe.h.
References lf::uscalfe::FeLagrangeO2Quad< SCALAR >::NumRefShapeFunctions().
|
inlineoverridevirtual |
Nine local shape functions are associated with a quadrilateral cell.
Refer to Example 2.6.2.7.
Reimplemented from lf::fe::ScalarReferenceFiniteElement< SCALAR >.
Definition at line 737 of file lagr_fe.h.
Referenced by lf::uscalfe::FeLagrangeO2Quad< SCALAR >::NumEvaluationNodes().
|
inlineoverridevirtual |
One shape function is attached to each node and edge of the quadrilateral. One interior shape function.
Reimplemented from lf::fe::ScalarReferenceFiniteElement< SCALAR >.
|
inlineoverridevirtual |
One shape function is attached to each node and each edge of the quadrilateral. One interior shape function.
Implements lf::fe::ScalarReferenceFiniteElement< SCALAR >.
|
default |
|
defaultnoexcept |
|
inlineoverridevirtual |
Tells the type of reference cell underlying the parametric finite element.
Implements lf::fe::ScalarReferenceFiniteElement< SCALAR >.
Definition at line 723 of file lagr_fe.h.
References lf::base::RefEl::kQuad().
|
staticprivate |
description of the shape functions on the reference line segment \( [0,1] \) that are used in the tensor product construction of the shape functions
Definition at line 885 of file lagr_fe.h.
Referenced by lf::uscalfe::FeLagrangeO2Quad< SCALAR >::EvalReferenceShapeFunctions(), and lf::uscalfe::FeLagrangeO2Quad< SCALAR >::GradientsReferenceShapeFunctions().
|
staticprivate |
The shape functions are computed by a tensor product construction: The shape function associated with the interpolation node \( \mathbf{p} =(x_j,y_l)\) is computed as
\[ \hat{b}^{\mathbf{p}}(x_1,x_2)=\hat{b}^j(x_1)*\hat{b}^l(x_2) \]
Where \( \hat{b}^j\) and \( \hat{b}^l \) are the quadratic Lagrangian shape functions on the reference line segment associated to the interpolation nodes \( x_j \) and \( y_l \).
This matrix of size NumRefShapeFunctions x 2 contains in each row the indices of the "segment" shape functions, that define the reference shape function via the above formula. if \(p\) was the \(k\)-th interpolation node, the \(k\)-th row would contain the indices \(j\) and \(l\).
Definition at line 904 of file lagr_fe.h.
Referenced by lf::uscalfe::FeLagrangeO2Quad< SCALAR >::EvalReferenceShapeFunctions(), and lf::uscalfe::FeLagrangeO2Quad< SCALAR >::GradientsReferenceShapeFunctions().