LehrFEM++ 1.0.0
A simple Finite Element Library for teaching
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. More...
 
unsigned Degree () const override
 Quadratic Lagrangian finite elements rely on polynomials of degree 2. More...
 
size_type NumRefShapeFunctions () const override
 Six local shape functions are associated with a triangular cell in the case of quadratic Lagrangian finite elements. More...
 
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. More...
 
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. More...
 
Eigen::Matrix< SCALAR, Eigen::Dynamic, Eigen::Dynamic > EvalReferenceShapeFunctions (const Eigen::MatrixXd &refcoords) const override
 Point evaluation of reference shape functions. More...
 
Eigen::Matrix< SCALAR, Eigen::Dynamic, Eigen::Dynamic > GradientsReferenceShapeFunctions (const Eigen::MatrixXd &refcoords) const override
 Point evaluations of gradients of reference shape functions. More...
 
Eigen::MatrixXd EvaluationNodes () const override
 Evaluation nodes are the three vertices of the triangle and the three midpoints of its edges. More...
 
size_type NumEvaluationNodes () const override
 Six evaluation nodes, the same number as local shape functions. More...
 
- Public Member Functions inherited from lf::fe::ScalarReferenceFiniteElement< SCALAR >
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...
 

Additional Inherited Members

- Public Types inherited from lf::fe::ScalarReferenceFiniteElement< SCALAR >
using Scalar = SCALAR
 The underlying scalar type. More...
 
- 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 399 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 418 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 458 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 528 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 485 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 542 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 425 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 433 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 444 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 411 of file lagr_fe.h.

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


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