deal.II version GIT relicensing-2149-g6c46669274 2024-11-13 14:40:00+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 | Static Public Member Functions | Private Attributes | List of all members
PolynomialsBDM< dim > Class Template Reference

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

Inheritance diagram for PolynomialsBDM< dim >:
Inheritance graph
[legend]

Public Member Functions

 PolynomialsBDM (const unsigned int k)
 
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)
 

Private Attributes

const PolynomialSpace< dim > polynomial_space
 
std::vector< Polynomials::Polynomial< double > > monomials
 
Threads::Mutex mutex
 
std::vector< double > p_values
 
std::vector< Tensor< 1, dim > > p_grads
 
std::vector< Tensor< 2, dim > > p_grad_grads
 
std::vector< Tensor< 3, dim > > p_third_derivatives
 
std::vector< Tensor< 4, dim > > p_fourth_derivatives
 
const unsigned int polynomial_degree
 
const unsigned int n_pols
 

Detailed Description

template<int dim>
class PolynomialsBDM< dim >

This class implements the Hdiv-conforming, vector-valued Brezzi-Douglas-Marini ( BDM ) polynomials described in Brezzi and Fortin's Mixed and Hybrid Finite Element Methods (refer to pages 119 - 124).

The BDM polynomial space contain the entire \((P_{k})^{n}\) space (constructed with PolynomialSpace Legendre polynomials) as well as part of \((P_{k+1})^{n}\) (ie. \((P_{k})^{n} \subset BDM_{k} \subset (P_{k+1})^{n}\)). Furthermore, \(BDM_{k}\) elements are designed so that \(\nabla \cdot q \in P_{k-1} (K)\) and \(q \cdot n |_{e_{i}} \in P_{k}(e_{i})\). More details of two and three dimensional \(BDM_{k}\) elements are given below.

In 2d:

\( BDM_{k} = \{\mathbf{q} | \mathbf{q} = p_{k} (x,y) + r \; \text{curl} (x^{k+1}y) + s \; \text{curl} (xy^{k+1}), p_{k} \in (P_{k})^{2} \}\).

Note: the curl of a scalar function is given by \(\text{curl}(f(x,y)) = \begin{pmatrix} f_{y}(x,y) \\ -f_{x}(x,y) \end{pmatrix}\).

The basis used to construct the \(BDM_{1}\) shape functions is

\begin{align*} \phi_0 = \begin{pmatrix} 1 \\ 0 \end{pmatrix}, \phi_1 = \begin{pmatrix} -\sqrt{3}+2\sqrt{3}x \\ 0 \end{pmatrix}, \phi_2 = \begin{pmatrix} -\sqrt{3}+2\sqrt{3}y \\ 0 \end{pmatrix}, \phi_3 = \begin{pmatrix} 0 \\ 1 \end{pmatrix}, \phi_4 = \begin{pmatrix} 0 \\ -\sqrt{3}+2\sqrt{3}x \end{pmatrix}, \phi_5 = \begin{pmatrix} 0 \\ -\sqrt{3}+2\sqrt{3}y \end{pmatrix}, \phi_6 = \begin{pmatrix} x^2 \\ -2xy \end{pmatrix}, \phi_7 = \begin{pmatrix} 2xy \\ -y^2 \end{pmatrix}. \end{align*}

The dimension of the \(BDM_{k}\) space is \((k+1)(k+2)+2\), with \(k+1\) unknowns per edge and \(k(k-1)\) interior unknowns.

In 3d:

\( BDM_{k} = \{\mathbf{q} | \mathbf{q} = p_{k} (x,y,z) + \sum_{i=0}^{k} ( r_{i} \; \text{curl} \begin{pmatrix} 0\\0\\xy^{i+1}z^{k-i} \end{pmatrix} + s_{i} \; \text{curl} \begin{pmatrix} yz^{i+1}x^{k-i}\\0\\0 \end{pmatrix} + t_{i} \; \text{curl} \begin{pmatrix}0\\zx^{i+1}y^{k-i}\\0\end{pmatrix}) , p_{k} \in (P_{k})^{3} \}\).

Note: the 3d description of \(BDM_{k}\) is not unique. See Mixed and Hybrid Finite Element Methods page 122 for an alternative definition.

The dimension of the \(BDM_{k}\) space is \(\dfrac{(k+1)(k+2)(k+3)}{2}+3(k+1)\), with \(\dfrac{(k+1)(k+2)}{2}\) unknowns per face and \(\dfrac{(k-1)k(k+1)}{2}\) interior unknowns.

Definition at line 98 of file polynomials_bdm.h.

Constructor & Destructor Documentation

◆ PolynomialsBDM()

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

Constructor. Creates all basis functions for BDM polynomials of given degree.

  • k: the degree of the BDM-space, which is the degree of the largest complete polynomial space Pk contained in the BDM- space.

Definition at line 29 of file polynomials_bdm.cc.

Member Function Documentation

◆ evaluate()

template<int dim>
void PolynomialsBDM< 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 BDM 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.

Implements TensorPolynomialsBase< dim >.

Definition at line 55 of file polynomials_bdm.cc.

◆ name()

template<int dim>
std::string PolynomialsBDM< dim >::name ( ) const
inlineoverridevirtual

Return the name of the space, which is BDM.

Implements TensorPolynomialsBase< dim >.

Definition at line 193 of file polynomials_bdm.h.

◆ n_polynomials()

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

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

Definition at line 361 of file polynomials_bdm.cc.

◆ clone()

template<int dim>
std::unique_ptr< TensorPolynomialsBase< dim > > PolynomialsBDM< 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_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 376 of file polynomials_bdm.cc.

◆ n()

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

Return the number of polynomials.

Definition at line 151 of file tensor_polynomials_base.h.

◆ degree()

template<int dim>
unsigned int TensorPolynomialsBase< dim >::degree ( ) const
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 160 of file tensor_polynomials_base.h.

Member Data Documentation

◆ polynomial_space

template<int dim>
const PolynomialSpace<dim> PolynomialsBDM< dim >::polynomial_space
private

An object representing the polynomial space used here. The constructor fills this with the monomial basis.

Definition at line 151 of file polynomials_bdm.h.

◆ monomials

template<int dim>
std::vector<Polynomials::Polynomial<double> > PolynomialsBDM< dim >::monomials
private

Storage for monomials. In 2d, this is just the polynomial of order k. In 3d, we need all polynomials from degree zero to k.

Definition at line 157 of file polynomials_bdm.h.

◆ mutex

template<int dim>
Threads::Mutex PolynomialsBDM< dim >::mutex
mutableprivate

A mutex that guards the following scratch arrays.

Definition at line 162 of file polynomials_bdm.h.

◆ p_values

template<int dim>
std::vector<double> PolynomialsBDM< dim >::p_values
mutableprivate

Auxiliary memory.

Definition at line 167 of file polynomials_bdm.h.

◆ p_grads

template<int dim>
std::vector<Tensor<1, dim> > PolynomialsBDM< dim >::p_grads
mutableprivate

Auxiliary memory.

Definition at line 172 of file polynomials_bdm.h.

◆ p_grad_grads

template<int dim>
std::vector<Tensor<2, dim> > PolynomialsBDM< dim >::p_grad_grads
mutableprivate

Auxiliary memory.

Definition at line 177 of file polynomials_bdm.h.

◆ p_third_derivatives

template<int dim>
std::vector<Tensor<3, dim> > PolynomialsBDM< dim >::p_third_derivatives
mutableprivate

Auxiliary memory.

Definition at line 182 of file polynomials_bdm.h.

◆ p_fourth_derivatives

template<int dim>
std::vector<Tensor<4, dim> > PolynomialsBDM< dim >::p_fourth_derivatives
mutableprivate

Auxiliary memory.

Definition at line 187 of file polynomials_bdm.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 139 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 144 of file tensor_polynomials_base.h.


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