Reference documentation for deal.II version 9.4.0
PolynomialsRaviartThomas< dim > Class Template Reference

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

Inheritance diagram for PolynomialsRaviartThomas< dim >:
[legend]

Public Member Functions

PolynomialsRaviartThomas (const unsigned int k)

PolynomialsRaviartThomas (const PolynomialsRaviartThomas &other)

void evaluate (const Point< dim > &unit_point, std::vector< Tensor< 1, dim > > &values, std::vector< Tensor< 2, dim > > &grads, std::vector< Tensor< 3, dim > > &grad_grads, std::vector< Tensor< 4, dim > > &third_derivatives, std::vector< Tensor< 5, dim > > &fourth_derivatives) const override

std::string name () const override

virtual std::unique_ptr< TensorPolynomialsBase< dim > > clone () const override

unsigned int n () const

unsigned int degree () const

Static Public Member Functions

static unsigned int n_polynomials (const unsigned int degree)

Static Private Member Functions

static std::vector< std::vector< Polynomials::Polynomial< double > > > create_polynomials (const unsigned int k)

Private Attributes

const AnisotropicPolynomials< dim > polynomial_space

std::mutex scratch_arrays_mutex

std::vector< double > scratch_values

std::vector< Tensor< 1, dim > > scratch_grads

std::vector< Tensor< 3, dim > > scratch_third_derivatives

std::vector< Tensor< 4, dim > > scratch_fourth_derivatives

const unsigned int polynomial_degree

const unsigned int n_pols

Detailed Description

template<int dim>
class PolynomialsRaviartThomas< dim >

This class implements the Hdiv-conforming, vector-valued Raviart-Thomas polynomials as described in the book by Brezzi and Fortin.

The Raviart-Thomas polynomials are constructed such that the divergence is in the tensor product polynomial space Qk. Therefore, the polynomial order of each component must be one order higher in the corresponding direction, yielding the polynomial spaces (Qk+1,k, Qk,k+1) and (Qk+1,k,k, Qk,k+1,k, Qk,k,k+1) in 2D and 3D, resp.

Definition at line 50 of file polynomials_raviart_thomas.h.

◆ PolynomialsRaviartThomas() [1/2]

template<int dim>
 PolynomialsRaviartThomas< dim >::PolynomialsRaviartThomas ( const unsigned int k )

Constructor. Creates all basis functions for Raviart-Thomas polynomials of given degree.

• k: the degree of the Raviart-Thomas-space, which is the degree of the largest tensor product polynomial space Qk contains.

Definition at line 38 of file polynomials_raviart_thomas.cc.

◆ PolynomialsRaviartThomas() [2/2]

template<int dim>
 PolynomialsRaviartThomas< dim >::PolynomialsRaviartThomas ( const PolynomialsRaviartThomas< dim > & other )

Copy constructor.

Definition at line 46 of file polynomials_raviart_thomas.cc.

◆ evaluate()

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

Compute the value and the first and second derivatives of each Raviart- Thomas polynomial 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 tensor product 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.

Implements TensorPolynomialsBase< dim >.

Definition at line 96 of file polynomials_raviart_thomas.cc.

◆ name()

template<int dim>
 std::string PolynomialsRaviartThomas< dim >::name
inlineoverridevirtual

Return the name of the space, which is RaviartThomas.

Implements TensorPolynomialsBase< dim >.

Definition at line 145 of file polynomials_raviart_thomas.h.

◆ n_polynomials()

template<int dim>
 unsigned int PolynomialsRaviartThomas< dim >::n_polynomials ( const unsigned int degree )
static

Return the number of polynomials in the space RT(degree) without requiring to build an object of PolynomialsRaviartThomas. This is required by the FiniteElement classes.

Definition at line 191 of file polynomials_raviart_thomas.cc.

◆ clone()

template<int dim>
 std::unique_ptr< TensorPolynomialsBase< dim > > PolynomialsRaviartThomas< dim >::clone
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_PolyTensor, need to make copies of polynomial spaces without knowing their exact type. They do so through this function.

Implements TensorPolynomialsBase< dim >.

Definition at line 207 of file polynomials_raviart_thomas.cc.

◆ create_polynomials()

template<int dim>
 std::vector< std::vector< Polynomials::Polynomial< double > > > PolynomialsRaviartThomas< dim >::create_polynomials ( const unsigned int k )
staticprivate

A static member function that creates the polynomial space we use to initialize the polynomial_space member variable.

Definition at line 57 of file polynomials_raviart_thomas.cc.

◆ n()

template<int dim>
 unsigned int TensorPolynomialsBase< dim >::n
inlineinherited

Return the number of polynomials.

Definition at line 157 of file tensor_polynomials_base.h.

◆ degree()

template<int dim>
 unsigned int TensorPolynomialsBase< dim >::degree
inlineinherited

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.

Definition at line 166 of file tensor_polynomials_base.h.

◆ polynomial_space

template<int dim>
 const AnisotropicPolynomials PolynomialsRaviartThomas< dim >::polynomial_space
private

An object representing the polynomial space for a single component. We can re-use it by rotating the coordinates of the evaluation point.

Definition at line 113 of file polynomials_raviart_thomas.h.

◆ scratch_arrays_mutex

template<int dim>
 std::mutex PolynomialsRaviartThomas< dim >::scratch_arrays_mutex
mutableprivate

A mutex with which to guard access to the following mutable variables.

Definition at line 126 of file polynomials_raviart_thomas.h.

◆ scratch_values

template<int dim>
 std::vector PolynomialsRaviartThomas< dim >::scratch_values
mutableprivate

The following arrays are used as scratch data in the evaluate() function. Since that function is const, they have to be marked as mutable, and since we want that function to be thread-safe, access to these scratch arrays is guarded by the mutex above.

Definition at line 134 of file polynomials_raviart_thomas.h.

template<int dim>
mutableprivate

Definition at line 135 of file polynomials_raviart_thomas.h.

template<int dim>
mutableprivate

Definition at line 136 of file polynomials_raviart_thomas.h.

◆ scratch_third_derivatives

template<int dim>
 std::vector > PolynomialsRaviartThomas< dim >::scratch_third_derivatives
mutableprivate

Definition at line 137 of file polynomials_raviart_thomas.h.

◆ scratch_fourth_derivatives

template<int dim>
 std::vector > PolynomialsRaviartThomas< dim >::scratch_fourth_derivatives
mutableprivate

Definition at line 138 of file polynomials_raviart_thomas.h.

◆ polynomial_degree

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

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

Definition at line 145 of file tensor_polynomials_base.h.

◆ n_pols

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

The number of polynomials represented by this object.

Definition at line 150 of file tensor_polynomials_base.h.

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