Reference documentation for deal.II version 9.3.0
\(\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\}}\)
Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Attributes | List of all members
BarycentricPolynomials< dim > Class Template Reference

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

Inheritance diagram for BarycentricPolynomials< dim >:
[legend]

Public Member Functions

 BarycentricPolynomials (const std::vector< BarycentricPolynomial< dim >> &polynomials)
 
const BarycentricPolynomial< dim > & operator[] (const std::size_t i) const
 
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
 
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
 
virtual std::size_t memory_consumption () const override
 
std::string name () const override
 
virtual std::unique_ptr< ScalarPolynomialsBase< dim > > clone () const override
 

Static Public Member Functions

static BarycentricPolynomials< dim > get_fe_p_basis (const unsigned int degree)
 

Static Public Attributes

static const unsigned int dimension = dim
 

Protected Attributes

std::vector< BarycentricPolynomial< dim > > polys
 
Table< 2, BarycentricPolynomial< dim > > poly_grads
 
Table< 3, BarycentricPolynomial< dim > > poly_hessians
 
Table< 4, BarycentricPolynomial< dim > > poly_third_derivatives
 
Table< 5, BarycentricPolynomial< dim > > poly_fourth_derivatives
 

Detailed Description

template<int dim>
class BarycentricPolynomials< dim >

Scalar polynomial space based on barycentric polynomials.

Definition at line 214 of file polynomials_barycentric.h.

Constructor & Destructor Documentation

◆ BarycentricPolynomials()

template<int dim>
BarycentricPolynomials< dim >::BarycentricPolynomials ( const std::vector< BarycentricPolynomial< dim >> &  polynomials)

Constructor taking the polynomial degree as input.

Definition at line 104 of file polynomials_barycentric.cc.

Member Function Documentation

◆ get_fe_p_basis()

template<int dim>
BarycentricPolynomials< dim > BarycentricPolynomials< dim >::get_fe_p_basis ( const unsigned int  degree)
static

Get the standard Lagrange basis for a specified degree.

Definition at line 58 of file polynomials_barycentric.cc.

◆ operator[]()

template<int dim>
const BarycentricPolynomial< dim > & BarycentricPolynomials< dim >::operator[] ( const std::size_t  i) const

Access operator.

Definition at line 701 of file polynomials_barycentric.h.

◆ evaluate()

template<int dim>
void BarycentricPolynomials< 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
override

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.

Definition at line 148 of file polynomials_barycentric.cc.

◆ compute_value()

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

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

Consider using evaluate() instead.

Definition at line 207 of file polynomials_barycentric.cc.

◆ compute_1st_derivative()

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

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

Consider using evaluate() instead.

Definition at line 218 of file polynomials_barycentric.cc.

◆ compute_2nd_derivative()

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

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

Consider using evaluate() instead.

Definition at line 231 of file polynomials_barycentric.cc.

◆ compute_3rd_derivative()

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

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

Consider using evaluate() instead.

Definition at line 246 of file polynomials_barycentric.cc.

◆ compute_4th_derivative()

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

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

Consider using evaluate() instead.

Definition at line 262 of file polynomials_barycentric.cc.

◆ compute_grad()

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

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

Consider using evaluate() instead.

Definition at line 280 of file polynomials_barycentric.cc.

◆ compute_grad_grad()

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

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

Consider using evaluate() instead.

Definition at line 290 of file polynomials_barycentric.cc.

◆ memory_consumption()

template<int dim>
std::size_t BarycentricPolynomials< dim >::memory_consumption ( ) const
overridevirtual

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

Definition at line 318 of file polynomials_barycentric.cc.

◆ name()

template<int dim>
std::string BarycentricPolynomials< dim >::name ( ) const
override

Return the name of the space.

Definition at line 309 of file polynomials_barycentric.cc.

◆ clone()

template<int dim>
std::unique_ptr< ScalarPolynomialsBase< dim > > BarycentricPolynomials< dim >::clone ( ) const
overridevirtual

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.

Definition at line 300 of file polynomials_barycentric.cc.

Member Data Documentation

◆ dimension

template<int dim>
const unsigned int BarycentricPolynomials< dim >::dimension = dim
static

Make the dimension available to the outside.

Definition at line 220 of file polynomials_barycentric.h.

◆ polys

template<int dim>
std::vector<BarycentricPolynomial<dim> > BarycentricPolynomials< dim >::polys
protected

Definition at line 315 of file polynomials_barycentric.h.

◆ poly_grads

template<int dim>
Table<2, BarycentricPolynomial<dim> > BarycentricPolynomials< dim >::poly_grads
protected

Definition at line 317 of file polynomials_barycentric.h.

◆ poly_hessians

template<int dim>
Table<3, BarycentricPolynomial<dim> > BarycentricPolynomials< dim >::poly_hessians
protected

Definition at line 319 of file polynomials_barycentric.h.

◆ poly_third_derivatives

template<int dim>
Table<4, BarycentricPolynomial<dim> > BarycentricPolynomials< dim >::poly_third_derivatives
protected

Definition at line 321 of file polynomials_barycentric.h.

◆ poly_fourth_derivatives

template<int dim>
Table<5, BarycentricPolynomial<dim> > BarycentricPolynomials< dim >::poly_fourth_derivatives
protected

Definition at line 323 of file polynomials_barycentric.h.


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