deal.II version 9.7.1
\(\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
Polynomials Namespace Reference

Namespaces

namespace  internal

Classes

class  Polynomial
class  Monomial
class  Legendre
class  Lobatto
class  Hierarchical
class  HermiteInterpolation
class  HermiteLikeInterpolation
class  PolynomialsHermite
class  PiecewisePolynomial

Functions

 LagrangeEquidistant (const unsigned int n, const unsigned int support_point)
static std::vector< Polynomial< double > > generate_complete_basis (const unsigned int degree)
static void compute_coefficients (const unsigned int n, const unsigned int support_point, std::vector< double > &a)
std::vector< Polynomial< double > > generate_complete_Lagrange_basis (const std::vector< Point< 1 > > &points)
template<typename Number>
Number jacobi_polynomial_value (const unsigned int degree, const int alpha, const int beta, const Number x)
template<typename Number>
std::vector< Number > jacobi_polynomial_roots (const unsigned int degree, const int alpha, const int beta)
std::vector< PiecewisePolynomial< double > > generate_complete_Lagrange_basis_on_subdivisions (const unsigned int n_subdivisions, const unsigned int base_degree)
std::vector< PiecewisePolynomial< double > > generate_complete_linear_basis_on_subdivisions (const std::vector< Point< 1 > > &points)

Detailed Description

A namespace in which classes relating to the description of 1d polynomial spaces are declared.

Function Documentation

◆ LagrangeEquidistant()

Polynomials::LagrangeEquidistant::LagrangeEquidistant ( const unsigned int n,
const unsigned int support_point )

Lagrange polynomials with equidistant interpolation points in [0,1]. The polynomial of degree n has got n+1 interpolation points. The interpolation points are sorted in ascending order. This order gives an index to each interpolation point. A Lagrangian polynomial equals to 1 at its `support point', and 0 at all other interpolation points. For example, if the degree is 3, and the support point is 1, then the polynomial represented by this object is cubic and its value is 1 at the point x=1/3, and zero at the point x=0, x=2/3, and x=1. All the polynomials have polynomial degree equal to degree, but together they span the entire space of polynomials of degree less than or equal degree.

The Lagrange polynomials are implemented up to degree 10. */ class LagrangeEquidistant : public Polynomial<double> { public: /** Constructor. Takes the degree n of the Lagrangian polynomial and the index support_point of the support point. Fills the coefficients of the base class Polynomial.

Definition at line 581 of file polynomial.cc.

◆ generate_complete_basis()

std::vector< Polynomial< double > > Polynomials::generate_complete_basis ( const unsigned int degree)
static

Return a vector of polynomial objects of degree degree, which then spans the full space of polynomials up to the given degree. The polynomials are generated by calling the constructor of this class with the same degree but support point running from zero to degree. This function may be used to initialize the TensorProductPolynomials and PolynomialSpace classes.

◆ compute_coefficients()

void Polynomials::compute_coefficients ( const unsigned int n,
const unsigned int support_point,
std::vector< double > & a )
staticprivate

Compute the coefficients of the base class Polynomial. This function is static to allow to be called in the constructor.

◆ generate_complete_Lagrange_basis()

std::vector< Polynomial< double > > Polynomials::generate_complete_Lagrange_basis ( const std::vector< Point< 1 > > & points)
private

Given a set of points along the real axis, this function returns all Lagrange polynomials for interpolation of these points. The number of polynomials is equal to the number of points and the maximum degree is one less.

Definition at line 686 of file polynomial.cc.

◆ jacobi_polynomial_value()

template<typename Number>
Number Polynomials::jacobi_polynomial_value ( const unsigned int degree,
const int alpha,
const int beta,
const Number x )
private

Definition at line 1047 of file polynomial.h.

◆ jacobi_polynomial_roots()

template<typename Number>
std::vector< Number > Polynomials::jacobi_polynomial_roots ( const unsigned int degree,
const int alpha,
const int beta )
private

Compute the roots of the Jacobi polynomials on the unit interval $[0, 1]$ of the given degree. These roots are used in several places inside the deal.II library, such as the Gauss-Lobatto quadrature formula or for the Hermite-like interpolation.

The algorithm uses a Newton algorithm, using the zeros of the Chebyshev polynomials as an initial guess. This code has been tested for alpha and beta equal to zero (Legendre case), one (Gauss-Lobatto case) as well as two, so be careful when using it for other values as the Newton iteration might or might not converge.

Definition at line 1088 of file polynomial.h.

◆ generate_complete_Lagrange_basis_on_subdivisions()

std::vector< PiecewisePolynomial< double > > Polynomials::generate_complete_Lagrange_basis_on_subdivisions ( const unsigned int n_subdivisions,
const unsigned int base_degree )

Generates a complete Lagrange basis on a subdivision of the unit interval in smaller intervals for a given degree on the subintervals and number of intervals.

Definition at line 199 of file polynomials_piecewise.cc.

◆ generate_complete_linear_basis_on_subdivisions()

std::vector< PiecewisePolynomial< double > > Polynomials::generate_complete_linear_basis_on_subdivisions ( const std::vector< Point< 1 > > & points)

Generates a complete linear basis on a subdivision of the unit interval in smaller intervals for a given vector of points.

Definition at line 224 of file polynomials_piecewise.cc.