// ------------------------------------------------------------------------ // // SPDX-License-Identifier: LGPL-2.1-or-later // Copyright (C) 2004 - 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_abf_h #define dealii_polynomials_abf_h #include #include #include #include #include #include #include #include #include #include #include DEAL_II_NAMESPACE_OPEN /** * This class implements the Hdiv-conforming, vector-valued * Arnold-Boffi-Falk polynomials as described in the article by Arnold, Boffi, * and Falk: Quadrilateral H(div) finite elements, SIAM J. Numer. Anal., Vol. * 42, No. 6, pp.2429-2451 * * * The ABF polynomials are constructed such that the divergence is in the * tensor product polynomial space Qk. Therefore, the * polynomial order of each component must be two orders higher in the * corresponding direction, yielding the polynomial spaces * (Qk+2,k, Qk,k+2) and (Qk+2,k,k, * Qk,k+2,k, Qk,k,k+2) in 2d and 3d, resp. * * @ingroup Polynomials */ template class PolynomialsABF : public TensorPolynomialsBase { public: /** * Constructor. Creates all basis functions for Raviart-Thomas polynomials * of given degree. * * @arg k: the degree of the Raviart-Thomas-space, which is the degree of * the largest tensor product polynomial space Qk * contained. */ PolynomialsABF(const unsigned int k); /** * Compute the value and the first and second derivatives of each * Raviart-Thomas 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 ABF. */ std::string name() const override; /** * Return the number of polynomials in the space RT(degree) without * requiring to build an object of PolynomialsABF. 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 polynomial space for a single component. We * can re-use it for the other vector components by rotating the * coordinates of the evaluation point. */ const AnisotropicPolynomials polynomial_space; /** * A mutex that guards the following scratch arrays. */ mutable Threads::Mutex mutex; /** * Auxiliary memory. */ mutable std::vector p_values; /** * Auxiliary memory. */ mutable std::vector> p_grads; /** * Auxiliary memory. */ mutable std::vector> p_grad_grads; /** * Auxiliary memory. */ mutable std::vector> p_third_derivatives; /** * Auxiliary memory. */ mutable std::vector> p_fourth_derivatives; }; template inline std::string PolynomialsABF::name() const { return "ABF"; } DEAL_II_NAMESPACE_CLOSE #endif