deal.II version GIT relicensing-6834-g5b78e6bcdf 2026-10-01 11:20:01+00:00
\(\newcommand{\dealvcentcolon}{\mathrel{\mathop{:}}}\) \(\newcommand{\dealcoloneq}{\dealvcentcolon\mathrel{\mkern-1.2mu}=}\) \(\newcommand{\jump}[1]{\left[\!\left[ #1 \right]\!\right]}\) \(\newcommand{\average}[1]{\left\{\!\left\{ #1 \right\}\!\right\}}\)
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | Protected Attributes | Private Attributes | List of all members
ScalarPolynomialsVandermondeBase< dim > Class Template Referenceabstract

#include <deal.II/base/scalar_polynomials_vandermonde_base.h>

Detailed Description

template<int dim>
class ScalarPolynomialsVandermondeBase< dim >

This class provides a framework for finite elements using a nodal polynomial basis, where the polynomial basis is constructed by evaluating the values of a modal basis first that then gets transformed to the actual nodal polynomial values via a Vandermonde matrix. This is a common approach for high-order bases on general point distributions.

Any derived class must provide the most basic properties for the modal basis like evaluate_orthogonal_basis_function_by_degree(), evaluate_orthogonal_basis_function(), evaluate_orthogonal_basis_derivative_by_degree() and evaluate_orthogonal_basis_derivative().

Definition at line 41 of file scalar_polynomials_vandermonde_base.h.

Inheritance diagram for ScalarPolynomialsVandermondeBase< dim >:
[legend]

Public Member Functions

 ScalarPolynomialsVandermondeBase (const unsigned int degree, const unsigned int n_dofs)
 
virtual ~ScalarPolynomialsVandermondeBase ()=default
 
void evaluate (const Point< dim > &unit_point, std::vector< double > &values, std::vector< Tensor< 1, dim > > &grads, std::vector< Tensor< 2, dim > > &grad_grads, std::vector< Tensor< 3, dim > > &third_derivatives, std::vector< Tensor< 4, dim > > &fourth_derivatives) const override
 
double compute_value (const unsigned int i, const Point< dim > &p) const override
 
template<int order>
Tensor< order, dim > compute_derivative (const unsigned int i, const Point< dim > &p) const
 
Tensor< 1, dim > compute_1st_derivative (const unsigned int i, const Point< dim > &p) const override
 
Tensor< 2, dim > compute_2nd_derivative (const unsigned int i, const Point< dim > &p) const override
 
Tensor< 3, dim > compute_3rd_derivative (const unsigned int i, const Point< dim > &p) const override
 
Tensor< 4, dim > compute_4th_derivative (const unsigned int i, const Point< dim > &p) const override
 
Tensor< 1, dim > compute_grad (const unsigned int i, const Point< dim > &p) const override
 
Tensor< 2, dim > compute_grad_grad (const unsigned int i, const Point< dim > &p) const override
 
unsigned int n () const
 
virtual unsigned int degree () const
 
virtual std::unique_ptr< ScalarPolynomialsBase< dim > > clone () const =0
 
virtual std::string name () const =0
 
virtual std::size_t memory_consumption () const
 

Protected Member Functions

void reinit (const std::vector< Point< dim > > &support_points)
 
virtual double evaluate_orthogonal_basis_function_by_degree (const unsigned int i, const unsigned int j, const unsigned int k, const Point< dim > &p) const =0
 
virtual double evaluate_orthogonal_basis_function (const unsigned int i, const Point< dim > &p) const =0
 
virtual Tensor< 1, dim > evaluate_orthogonal_basis_derivative_by_degree (const unsigned int i, const unsigned int j, const unsigned int k, const Point< dim > &p) const =0
 
virtual Tensor< 1, dim > evaluate_orthogonal_basis_derivative (const unsigned int i, const Point< dim > &p) const =0
 
virtual Tensor< 2, dim > evaluate_orthogonal_basis_2nd_derivative_by_degree (const unsigned int i, const unsigned int j, const unsigned int k, const Point< dim > &p) const
 
virtual Tensor< 2, dim > evaluate_orthogonal_basis_2nd_derivative (const unsigned int i, const Point< dim > &p) const
 

Protected Attributes

FullMatrix< double > vandermonde_matrix_inverse
 

Private Attributes

const unsigned int polynomial_degree
 
const unsigned int n_pols
 

Constructor & Destructor Documentation

◆ ScalarPolynomialsVandermondeBase()

template<int dim>
ScalarPolynomialsVandermondeBase< dim >::ScalarPolynomialsVandermondeBase ( const unsigned int  degree,
const unsigned int  n_dofs 
)

Constructor. This takes the degree degree of the space and the number of polynomials n.

Definition at line 29 of file scalar_polynomials_vandermonde_base.cc.

◆ ~ScalarPolynomialsVandermondeBase()

template<int dim>
virtual ScalarPolynomialsVandermondeBase< dim >::~ScalarPolynomialsVandermondeBase ( )
virtualdefault

Member Function Documentation

◆ evaluate()

template<int dim>
void ScalarPolynomialsVandermondeBase< dim >::evaluate ( const Point< dim > &  unit_point,
std::vector< double > &  values,
std::vector< Tensor< 1, dim > > &  grads,
std::vector< Tensor< 2, dim > > &  grad_grads,
std::vector< Tensor< 3, dim > > &  third_derivatives,
std::vector< Tensor< 4, dim > > &  fourth_derivatives 
) const
overridevirtual

Compute the value and the derivatives of the polynomials at unit_point.

The size of the vectors must either be zero or equal n(). In the first case, the function will not compute these values.

If you need values or derivatives of all polynomials then use this function, rather than using any of the compute_value, compute_grad or compute_grad_grad functions, see below, in a loop over all tensor product polynomials.

Note
Currently, only the vectors values and grads are filled.

Implements ScalarPolynomialsBase< dim >.

Definition at line 160 of file scalar_polynomials_vandermonde_base.cc.

◆ compute_value()

template<int dim>
double ScalarPolynomialsVandermondeBase< dim >::compute_value ( const unsigned int  i,
const Point< dim > &  p 
) const
overridevirtual

Compute the value of the ith polynomial at unit point p.

Consider using evaluate() instead.

Implements ScalarPolynomialsBase< dim >.

Definition at line 90 of file scalar_polynomials_vandermonde_base.cc.

◆ compute_derivative()

template<int dim>
template<int order>
Tensor< order, dim > ScalarPolynomialsVandermondeBase< dim >::compute_derivative ( const unsigned int  i,
const Point< dim > &  p 
) const

Compute the orderth derivative of the ith polynomial at unit point p.

Consider using evaluate() instead.

Template Parameters
orderThe order of the derivative.
Note
Implemented for first derivative, for simplices also the second derivative is implemented.

Definition at line 215 of file scalar_polynomials_vandermonde_base.h.

◆ compute_1st_derivative()

template<int dim>
Tensor< 1, dim > ScalarPolynomialsVandermondeBase< dim >::compute_1st_derivative ( const unsigned int  i,
const Point< dim > &  p 
) const
overridevirtual

Compute the first derivative of the ith polynomial at unit point p.

Consider using evaluate() instead.

Implements ScalarPolynomialsBase< dim >.

Definition at line 185 of file scalar_polynomials_vandermonde_base.cc.

◆ compute_2nd_derivative()

template<int dim>
Tensor< 2, dim > ScalarPolynomialsVandermondeBase< dim >::compute_2nd_derivative ( const unsigned int  i,
const Point< dim > &  p 
) const
overridevirtual

Compute the second derivative of the ith polynomial at unit point p.

Consider using evaluate() instead.

Note
Only implemented for simplices.

Implements ScalarPolynomialsBase< dim >.

Definition at line 196 of file scalar_polynomials_vandermonde_base.cc.

◆ compute_3rd_derivative()

template<int dim>
Tensor< 3, dim > ScalarPolynomialsVandermondeBase< dim >::compute_3rd_derivative ( const unsigned int  i,
const Point< dim > &  p 
) const
overridevirtual

Compute the third derivative of the ith polynomial at unit point p.

Consider using evaluate() instead.

Note
Not implemented yet.

Implements ScalarPolynomialsBase< dim >.

Definition at line 207 of file scalar_polynomials_vandermonde_base.cc.

◆ compute_4th_derivative()

template<int dim>
Tensor< 4, dim > ScalarPolynomialsVandermondeBase< dim >::compute_4th_derivative ( const unsigned int  i,
const Point< dim > &  p 
) const
overridevirtual

Compute the fourth derivative of the ith polynomial at unit point p.

Consider using evaluate() instead.

Note
Not implemented yet.

Implements ScalarPolynomialsBase< dim >.

Definition at line 223 of file scalar_polynomials_vandermonde_base.cc.

◆ compute_grad()

template<int dim>
Tensor< 1, dim > ScalarPolynomialsVandermondeBase< dim >::compute_grad ( const unsigned int  i,
const Point< dim > &  p 
) const
overridevirtual

Compute the gradient of the ith polynomial at unit point p.

Consider using evaluate() instead.

Implements ScalarPolynomialsBase< dim >.

Definition at line 110 of file scalar_polynomials_vandermonde_base.cc.

◆ compute_grad_grad()

template<int dim>
Tensor< 2, dim > ScalarPolynomialsVandermondeBase< dim >::compute_grad_grad ( const unsigned int  i,
const Point< dim > &  p 
) const
overridevirtual

Compute the second derivative (grad_grad) of the ith polynomial at unit point p.

Consider using evaluate() instead.

Note
Only implemented for simplices.

Implements ScalarPolynomialsBase< dim >.

Definition at line 134 of file scalar_polynomials_vandermonde_base.cc.

◆ reinit()

template<int dim>
void ScalarPolynomialsVandermondeBase< dim >::reinit ( const std::vector< Point< dim > > &  support_points)
protected

Definition at line 39 of file scalar_polynomials_vandermonde_base.cc.

◆ evaluate_orthogonal_basis_function_by_degree()

template<int dim>
virtual double ScalarPolynomialsVandermondeBase< dim >::evaluate_orthogonal_basis_function_by_degree ( const unsigned int  i,
const unsigned int  j,
const unsigned int  k,
const Point< dim > &  p 
) const
protectedpure virtual

Evaluate the orthogonal basis at point p. The indices i, j and k correspond to the polynomial degrees of the Jacobi polynomials.

Implemented in ScalarLagrangePolynomialPyramid< dim >, ScalarLagrangePolynomialSimplex< dim >, and ScalarLagrangePolynomialWedge< dim >.

◆ evaluate_orthogonal_basis_function()

template<int dim>
virtual double ScalarPolynomialsVandermondeBase< dim >::evaluate_orthogonal_basis_function ( const unsigned int  i,
const Point< dim > &  p 
) const
protectedpure virtual

Evaluate the orthogonal basis function i at point p. This function determines the corresponding indices for the Jacobi polynomials and calls the function taking all indices as arguments.

Implemented in ScalarLagrangePolynomialPyramid< dim >, ScalarLagrangePolynomialSimplex< dim >, and ScalarLagrangePolynomialWedge< dim >.

◆ evaluate_orthogonal_basis_derivative_by_degree()

template<int dim>
virtual Tensor< 1, dim > ScalarPolynomialsVandermondeBase< dim >::evaluate_orthogonal_basis_derivative_by_degree ( const unsigned int  i,
const unsigned int  j,
const unsigned int  k,
const Point< dim > &  p 
) const
protectedpure virtual

Evaluate the derivative of the orthogonal basis at point p. The indices i, j and k correspond to the polynomial degrees of the Jacobi polynomials.

Implemented in ScalarLagrangePolynomialPyramid< dim >, ScalarLagrangePolynomialSimplex< dim >, and ScalarLagrangePolynomialWedge< dim >.

◆ evaluate_orthogonal_basis_derivative()

template<int dim>
virtual Tensor< 1, dim > ScalarPolynomialsVandermondeBase< dim >::evaluate_orthogonal_basis_derivative ( const unsigned int  i,
const Point< dim > &  p 
) const
protectedpure virtual

Evaluate the derivative of the orthogonal basis function i at point p. This function determines the corresponding indices for the Jacobi polynomials and calls the function taking all indices as arguments.

Implemented in ScalarLagrangePolynomialPyramid< dim >, ScalarLagrangePolynomialSimplex< dim >, and ScalarLagrangePolynomialWedge< dim >.

◆ evaluate_orthogonal_basis_2nd_derivative_by_degree()

template<int dim>
Tensor< 2, dim > ScalarPolynomialsVandermondeBase< dim >::evaluate_orthogonal_basis_2nd_derivative_by_degree ( const unsigned int  i,
const unsigned int  j,
const unsigned int  k,
const Point< dim > &  p 
) const
protectedvirtual

Evaluate the 2nd derivative of the orthogonal basis at point p. The indices i, j and k correspond to the polynomial degrees of the Jacobi polynomials.

Reimplemented in ScalarLagrangePolynomialSimplex< dim >.

Definition at line 239 of file scalar_polynomials_vandermonde_base.cc.

◆ evaluate_orthogonal_basis_2nd_derivative()

template<int dim>
Tensor< 2, dim > ScalarPolynomialsVandermondeBase< dim >::evaluate_orthogonal_basis_2nd_derivative ( const unsigned int  i,
const Point< dim > &  p 
) const
protectedvirtual

Evaluate the 2nd derivative of the orthogonal basis function i at point p. This function determines the corresponding indices for the Jacobi polynomials and calls the function taking all indices as arguments.

Reimplemented in ScalarLagrangePolynomialSimplex< dim >.

Definition at line 259 of file scalar_polynomials_vandermonde_base.cc.

◆ n()

template<int dim>
unsigned int ScalarPolynomialsBase< dim >::n ( ) const
inlineinherited

Return the number of polynomials.

Definition at line 254 of file scalar_polynomials_base.h.

◆ degree()

template<int dim>
unsigned int ScalarPolynomialsBase< dim >::degree ( ) const
inlinevirtualinherited

Return the highest polynomial degree of polynomials represented by this class. A derived class may override this if its value is different from my_degree.

Reimplemented in PolynomialsP< dim >.

Definition at line 263 of file scalar_polynomials_base.h.

◆ clone()

template<int dim>
virtual std::unique_ptr< ScalarPolynomialsBase< dim > > ScalarPolynomialsBase< dim >::clone ( ) const
pure virtualinherited

A sort of virtual copy constructor, this function returns a copy of the polynomial space object. Derived classes need to override the function here in this base class and return an object of the same type as the derived class.

Some places in the library, for example the constructors of FE_Poly, need to make copies of polynomial spaces without knowing their exact type. They do so through this function.

Implemented in PolynomialSpace< dim >, PolynomialSpace< dim - 1 >, PolynomialsAdini< dim >, BarycentricPolynomials< dim >, PolynomialsP< dim >, ScalarLagrangePolynomialPyramid< dim >, PolynomialsRannacherTurek< dim >, ScalarLagrangePolynomialSimplex< dim >, ScalarLagrangePolynomialWedge< dim >, TensorProductPolynomials< dim, PolynomialType >, TensorProductPolynomials< dim - 1 >, AnisotropicPolynomials< dim >, TensorProductPolynomialsBubbles< dim >, and TensorProductPolynomialsConst< dim >.

◆ name()

template<int dim>
virtual std::string ScalarPolynomialsBase< dim >::name ( ) const
pure virtualinherited

◆ memory_consumption()

template<int dim>
std::size_t ScalarPolynomialsBase< dim >::memory_consumption ( ) const
virtualinherited

Return an estimate (in bytes) for the memory consumption of this object.

Reimplemented in BarycentricPolynomials< dim >, TensorProductPolynomials< dim, PolynomialType >, and TensorProductPolynomials< dim - 1 >.

Definition at line 36 of file scalar_polynomials_base.cc.

Member Data Documentation

◆ vandermonde_matrix_inverse

template<int dim>
FullMatrix<double> ScalarPolynomialsVandermondeBase< dim >::vandermonde_matrix_inverse
protected

The Vandermonde matrix evaluates each modal basis function at the chosen nodal points. Applying the inverse of the Vandermonde matrix transforms from the modal basis to the nodal basis.

Definition at line 141 of file scalar_polynomials_vandermonde_base.h.

◆ polynomial_degree

template<int dim>
const unsigned int ScalarPolynomialsBase< dim >::polynomial_degree
privateinherited

The highest polynomial degree of this functions represented by this object.

Definition at line 225 of file scalar_polynomials_base.h.

◆ n_pols

template<int dim>
const unsigned int ScalarPolynomialsBase< dim >::n_pols
privateinherited

The number of polynomials represented by this object.

Definition at line 230 of file scalar_polynomials_base.h.


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