LehrFEM++ 1.0.0
A simple Finite Element Library for teaching
Loading...
Searching...
No Matches
Public Member Functions | List of all members
lf::uscalfe::FeLagrangeO2Tria< SCALAR > Class Template Referencefinal

Quadratic Lagrangian finite element on a triangular reference element. More...

#include <lf/uscalfe/uscalfe.h>

Inheritance diagram for lf::uscalfe::FeLagrangeO2Tria< SCALAR >:
lf::fe::ScalarReferenceFiniteElement< SCALAR >

Public Member Functions

 FeLagrangeO2Tria (const FeLagrangeO2Tria &)=default
 
 FeLagrangeO2Tria (FeLagrangeO2Tria &&) noexcept=default
 
FeLagrangeO2Triaoperator= (const FeLagrangeO2Tria &)=default
 
FeLagrangeO2Triaoperator= (FeLagrangeO2Tria &&) noexcept=default
 
 FeLagrangeO2Tria ()=default
 
 ~FeLagrangeO2Tria () override=default
 
base::RefEl RefEl () const override
 Tells the type of reference cell underlying the parametric finite element.
 
unsigned Degree () const override
 Quadratic Lagrangian finite elements rely on polynomials of degree 2.
 
size_type NumRefShapeFunctions () const override
 Six local shape functions are associated with a triangular cell in the case of quadratic Lagrangian finite elements.
 
size_type NumRefShapeFunctions (dim_t codim) const override
 One shape function attached to each node and one to each edge of the triangle. There are no interior shape functions.
 
size_type NumRefShapeFunctions (dim_t codim, sub_idx_t) const override
 One shape function attached to each node and one to each edge of the triangle. There are no interior shape functions.
 
Eigen::Matrix< SCALAR, Eigen::Dynamic, Eigen::Dynamic > EvalReferenceShapeFunctions (const Eigen::MatrixXd &refcoords) const override
 Point evaluation of reference shape functions.
 
Eigen::Matrix< SCALAR, Eigen::Dynamic, Eigen::Dynamic > GradientsReferenceShapeFunctions (const Eigen::MatrixXd &refcoords) const override
 Point evaluations of gradients of reference shape functions.
 
Eigen::MatrixXd EvaluationNodes () const override
 Evaluation nodes are the three vertices of the triangle and the three midpoints of its edges.
 
size_type NumEvaluationNodes () const override
 Six evaluation nodes, the same number as local shape functions.
 
- Public Member Functions inherited from lf::fe::ScalarReferenceFiniteElement< SCALAR >
virtual ~ScalarReferenceFiniteElement ()=default
 
dim_t Dimension () const
 Returns the spatial dimension of the reference cell.
 
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.
 

Additional Inherited Members

- Public Types inherited from lf::fe::ScalarReferenceFiniteElement< SCALAR >
using Scalar = SCALAR
 The underlying scalar type.
 
- Protected Member Functions inherited from lf::fe::ScalarReferenceFiniteElement< SCALAR >
 ScalarReferenceFiniteElement ()=default
 
 ScalarReferenceFiniteElement (const ScalarReferenceFiniteElement &)=default
 
 ScalarReferenceFiniteElement (ScalarReferenceFiniteElement &&) noexcept=default
 
ScalarReferenceFiniteElementoperator= (const ScalarReferenceFiniteElement &)=default
 
ScalarReferenceFiniteElementoperator= (ScalarReferenceFiniteElement &&) noexcept=default
 

Detailed Description

template<typename SCALAR>
class lf::uscalfe::FeLagrangeO2Tria< SCALAR >

Quadratic Lagrangian finite element on a triangular reference element.

This is a specialization of fe::ScalarReferenceFiniteElement.

The reference shape functions are combinations of the barycentric coordinate functions on the reference triangle, see Example 2.6.1.2.

The first three shape functions are associated to the vertices, the other three shape functions to the edges of the triangle. There are no interior shape functions, see Equation 2.6.1.6:

\begin{eqnarray} \hat{b}^1({\bf x}) &=& 2(1-x_1-x_2)(\frac12 -x_1 -x_2)\;,\\ \hat{b}^2({\bf x}) &=& 2x_1(x_1-\frac12)\;,\\ \hat{b}^3({\bf x}) &=& 2x_2(x_2-\frac12)\;,\\ \hat{b}^4({\bf x}) &=& 4(1-x_1-x_2)x_1\;,\\ \hat{b}^5({\bf x}) &=& 4x_1x_2\;,\\ \hat{b}^6({\bf x}) &=& 4(1-x_1-x_2)x_2\;. \end{eqnarray}

The numbering convention for the local shape functions is explained in Example 2.7.4.12.

See also
fe::ScalarReferenceFiniteElement

Definition at line 400 of file lagr_fe.h.

Constructor & Destructor Documentation

◆ FeLagrangeO2Tria() [1/3]

template<typename SCALAR >
lf::uscalfe::FeLagrangeO2Tria< SCALAR >::FeLagrangeO2Tria ( const FeLagrangeO2Tria< SCALAR > & )
default

◆ FeLagrangeO2Tria() [2/3]

template<typename SCALAR >
lf::uscalfe::FeLagrangeO2Tria< SCALAR >::FeLagrangeO2Tria ( FeLagrangeO2Tria< SCALAR > && )
defaultnoexcept

◆ FeLagrangeO2Tria() [3/3]

template<typename SCALAR >
lf::uscalfe::FeLagrangeO2Tria< SCALAR >::FeLagrangeO2Tria ( )
default

◆ ~FeLagrangeO2Tria()

template<typename SCALAR >
lf::uscalfe::FeLagrangeO2Tria< SCALAR >::~FeLagrangeO2Tria ( )
overridedefault

Member Function Documentation

◆ Degree()

template<typename SCALAR >
unsigned lf::uscalfe::FeLagrangeO2Tria< SCALAR >::Degree ( ) const
inlineoverridevirtual

Quadratic Lagrangian finite elements rely on polynomials of degree 2.

Implements lf::fe::ScalarReferenceFiniteElement< SCALAR >.

Definition at line 419 of file lagr_fe.h.

◆ EvalReferenceShapeFunctions()

template<typename SCALAR >
Eigen::Matrix< SCALAR, Eigen::Dynamic, Eigen::Dynamic > lf::uscalfe::FeLagrangeO2Tria< SCALAR >::EvalReferenceShapeFunctions ( const Eigen::MatrixXd & refcoords) const
inlineoverridevirtual

Point evaluation of reference shape functions.

The formulas of the reference shape functions are given in the class documentation of FeLagrangeO2Tria.

See also
fe::ScalarReferenceFiniteElement::EvalReferenceShapeFunctions()

Implements lf::fe::ScalarReferenceFiniteElement< SCALAR >.

Definition at line 459 of file lagr_fe.h.

◆ EvaluationNodes()

template<typename SCALAR >
Eigen::MatrixXd lf::uscalfe::FeLagrangeO2Tria< SCALAR >::EvaluationNodes ( ) const
inlineoverridevirtual

Evaluation nodes are the three vertices of the triangle and the three midpoints of its edges.

The reference shape functions as implemented by this class are a cardinal basis of the space of quadratic two-variate polynomials with respect to these evaluation nodes.

The numbering of evluation nodes is fixed by the numbering of the local shape functions.

See also
fe::ScalarReferenceFiniteElement::EvaluationNodes()

Implements lf::fe::ScalarReferenceFiniteElement< SCALAR >.

Definition at line 529 of file lagr_fe.h.

◆ GradientsReferenceShapeFunctions()

template<typename SCALAR >
Eigen::Matrix< SCALAR, Eigen::Dynamic, Eigen::Dynamic > lf::uscalfe::FeLagrangeO2Tria< SCALAR >::GradientsReferenceShapeFunctions ( const Eigen::MatrixXd & refcoords) const
inlineoverridevirtual

Point evaluations of gradients of reference shape functions.

Refer to Example 2.7.5.7 for related explanations

See also
fe::ScalarReferenceFiniteElement::GradientsReferenceShapeFunctions()

Implements lf::fe::ScalarReferenceFiniteElement< SCALAR >.

Definition at line 486 of file lagr_fe.h.

◆ NumEvaluationNodes()

template<typename SCALAR >
size_type lf::uscalfe::FeLagrangeO2Tria< SCALAR >::NumEvaluationNodes ( ) const
inlineoverridevirtual

Six evaluation nodes, the same number as local shape functions.

See also
fe::ScalarReferenceFiniteElement::NumEvaluationNodes()

Implements lf::fe::ScalarReferenceFiniteElement< SCALAR >.

Definition at line 543 of file lagr_fe.h.

References lf::uscalfe::FeLagrangeO2Tria< SCALAR >::NumRefShapeFunctions().

◆ NumRefShapeFunctions() [1/3]

template<typename SCALAR >
size_type lf::uscalfe::FeLagrangeO2Tria< SCALAR >::NumRefShapeFunctions ( ) const
inlineoverridevirtual

Six local shape functions are associated with a triangular cell in the case of quadratic Lagrangian finite elements.

See also
fe::ScalarReferenceFiniteElement::NumRefShapeFunctions()

Reimplemented from lf::fe::ScalarReferenceFiniteElement< SCALAR >.

Definition at line 426 of file lagr_fe.h.

Referenced by lf::uscalfe::FeLagrangeO2Tria< SCALAR >::NumEvaluationNodes().

◆ NumRefShapeFunctions() [2/3]

template<typename SCALAR >
size_type lf::uscalfe::FeLagrangeO2Tria< SCALAR >::NumRefShapeFunctions ( dim_t codim) const
inlineoverridevirtual

One shape function attached to each node and one to each edge of the triangle. There are no interior shape functions.

See also
fe::ScalarReferenceFiniteElement::NumRefShapeFunctions(dim_t)

Reimplemented from lf::fe::ScalarReferenceFiniteElement< SCALAR >.

Definition at line 434 of file lagr_fe.h.

◆ NumRefShapeFunctions() [3/3]

template<typename SCALAR >
size_type lf::uscalfe::FeLagrangeO2Tria< SCALAR >::NumRefShapeFunctions ( dim_t codim,
sub_idx_t  ) const
inlineoverridevirtual

One shape function attached to each node and one to each edge of the triangle. There are no interior shape functions.

See also
fe::ScalarReferenceFiniteElement::NumRefShapeFunctions(dim_t,sub_idx_t)

Implements lf::fe::ScalarReferenceFiniteElement< SCALAR >.

Definition at line 445 of file lagr_fe.h.

◆ operator=() [1/2]

template<typename SCALAR >
FeLagrangeO2Tria & lf::uscalfe::FeLagrangeO2Tria< SCALAR >::operator= ( const FeLagrangeO2Tria< SCALAR > & )
default

◆ operator=() [2/2]

template<typename SCALAR >
FeLagrangeO2Tria & lf::uscalfe::FeLagrangeO2Tria< SCALAR >::operator= ( FeLagrangeO2Tria< SCALAR > && )
defaultnoexcept

◆ RefEl()

template<typename SCALAR >
base::RefEl lf::uscalfe::FeLagrangeO2Tria< SCALAR >::RefEl ( ) const
inlineoverridevirtual

Tells the type of reference cell underlying the parametric finite element.

Implements lf::fe::ScalarReferenceFiniteElement< SCALAR >.

Definition at line 412 of file lagr_fe.h.

References lf::base::RefEl::kTria().


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