// ------------------------------------------------------------------------ // // SPDX-License-Identifier: LGPL-2.1-or-later // Copyright (C) 2018 - 2023 by the deal.II authors // // This file is part of the deal.II library. // // Part of the source code is dual licensed under Apache-2.0 WITH // LLVM-exception OR LGPL-2.1-or-later. Detailed license information // governing the source code and code contributions can be found in // LICENSE.md and CONTRIBUTING.md at the top level directory of deal.II. // // ------------------------------------------------------------------------ #ifndef dealii_polynomials_rt_bubbles_h #define dealii_polynomials_rt_bubbles_h #include #include #include #include #include #include #include #include DEAL_II_NAMESPACE_OPEN /** * This class implements the Hdiv-conforming, vector-valued * enhanced Raviart-Thomas polynomials. * * Similarly to the classical Raviart-Thomas space, the enhanced Raviart-Thomas * polynomials are constructed such that the divergence is in the tensor product * polynomial space Qk-1. * * This space is of the form Vk = RTk-1 + * Bk, where Bk is defined as follows: *
*
In 2d:
*
* @f{align*}{ * B_k^1(E) = \text{span}\left\{x^{a_1-1} y^{a_2}\begin{pmatrix} (a_2+1) x \\ * -a_1 y \end{pmatrix}\text{ : } a_2=k \right\} \\ * B_k^2(E) = \text{span}\left\{x^{b_1} y^{b_2-1}\begin{pmatrix} -b_2 x \\ * (b_1+1) y \end{pmatrix}\text{ : } b_1=k \right\} * @f} *
* *
In 3d:
*
* @f{align*}{ * B_k^1(E) = \text{span}\left\{x^{a_1-1} y^{a_2} z^{a_3}\begin{pmatrix} * (a_2+a_3+2) x \\ * -a_1 y \\ -a_1 z \end{pmatrix}\text{ : } a_2=k \text{ or } a_3=k * \right\},\\ * B_k^2(E) = \text{span}\left\{x^{b_1} y^{b_2-1} z^{b_3}\begin{pmatrix} -b_2 * x \\ * (b_1+b_3+2) y \\ -b_2 z \end{pmatrix}\text{ : } b_1=k \text{ or } b_3=k * \right\},\\ * B_k^3(E) = \text{span}\left\{x^{c_1}y^{c_2}z^{c_3-1}\begin{pmatrix} -c_3 x * \\ -c_3y \\ (c_1+c_2+2)z \end{pmatrix}\text{ : } c_1=k \text{ or } c_2=k * \right\}, * @f} *
*
* where $0 \le a_1, a_2, a_3 \le k$. * * @note Unlike the classical Raviart-Thomas space, the lowest order for the enhanced space * is 1, similarly to the Brezzi-Douglas-Marini (BDM) polynomial space. * * The total dimension of the space dim(Vk) = d*(k+1)^d, where * d is the space dimension. This allows to associate shape functions * with the Gauss-Lobatto quadrature points as shown in the figures below. * * * *
* @image html rtbubbles.png *
Left - $2d,\,k=3$, * right - $3d,\,k=2$.
* * @ingroup Polynomials */ template class PolynomialsRT_Bubbles : public TensorPolynomialsBase { public: /** * Constructor. Creates all basis functions for RT_bubbles polynomials of * given degree. */ PolynomialsRT_Bubbles(const unsigned int k); /** * Computes the value and the first and second derivatives of each RT_bubbles * polynomial at @p 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. */ void evaluate(const Point &unit_point, std::vector> &values, std::vector> &grads, std::vector> &grad_grads, std::vector> &third_derivatives, std::vector> &fourth_derivatives) const override; /** * Return the name of the space, which is RT_Bubbles. */ std::string name() const override; /** * Return the number of polynomials in the space RT_Bubbles(degree) * without requiring to build an object of PolynomialsRT-Bubbles. This is * required by the FiniteElement classes. */ static unsigned int n_polynomials(const unsigned int degree); /** * @copydoc TensorPolynomialsBase::clone() */ virtual std::unique_ptr> clone() const override; private: /** * An object representing the Raviart-Thomas part of the space */ const PolynomialsRaviartThomas raviart_thomas_space; /** * Storage for monomials, we need all polynomials from degree zero * to k+1. */ std::vector> monomials; }; template inline std::string PolynomialsRT_Bubbles::name() const { return "RT_bubbles"; } DEAL_II_NAMESPACE_CLOSE #endif