| 1 |
// ------------------------------------------------------------------------ |
| 2 |
// |
| 3 |
// SPDX-License-Identifier: LGPL-2.1-or-later |
| 4 |
// Copyright (C) 2004 - 2025 by the deal.II authors |
| 5 |
// |
| 6 |
// This file is part of the deal.II library. |
| 7 |
// |
| 8 |
// Part of the source code is dual licensed under Apache-2.0 WITH |
| 9 |
// LLVM-exception OR LGPL-2.1-or-later. Detailed license information |
| 10 |
// governing the source code and code contributions can be found in |
| 11 |
// LICENSE.md and CONTRIBUTING.md at the top level directory of deal.II. |
| 12 |
// |
| 13 |
// ------------------------------------------------------------------------ |
| 14 |
|
| 15 |
#ifndef dealii_polynomials_raviart_thomas_h |
| 16 |
#define dealii_polynomials_raviart_thomas_h |
| 17 |
|
| 18 |
|
| 19 |
#include <deal.II/base/config.h> |
| 20 |
|
| 21 |
#include <deal.II/base/exceptions.h> |
| 22 |
#include <deal.II/base/point.h> |
| 23 |
#include <deal.II/base/polynomial.h> |
| 24 |
#include <deal.II/base/polynomial_space.h> |
| 25 |
#include <deal.II/base/polynomials_vector_anisotropic.h> |
| 26 |
#include <deal.II/base/tensor.h> |
| 27 |
#include <deal.II/base/tensor_product_polynomials.h> |
| 28 |
|
| 29 |
#include <mutex> |
| 30 |
#include <vector> |
| 31 |
|
| 32 |
|
| 33 |
DEAL_II_NAMESPACE_OPEN |
| 34 |
|
| 35 |
/** |
| 36 |
* This class implements the <i>H<sup>div</sup></i>-conforming, |
| 37 |
* Raviart-Thomas polynomials as described in the book by Brezzi and Fortin. |
| 38 |
* Most of the functionality comes from the vector-valued anisotropic |
| 39 |
* polynomials class PolynomialsVectorAnisotropic. |
| 40 |
* |
| 41 |
* The Raviart-Thomas polynomials are constructed such that the divergence is |
| 42 |
* in the tensor product polynomial space <i>Q<sub>k</sub></i>. Therefore, the |
| 43 |
* polynomial order of each component must be one order higher in the |
| 44 |
* corresponding direction, yielding the polynomial spaces |
| 45 |
* <i>(Q<sub>k+1,k</sub>, Q<sub>k,k+1</sub>)</i> and <i>(Q<sub>k+1,k,k</sub>, |
| 46 |
* Q<sub>k,k+1,k</sub>, Q<sub>k,k,k+1</sub>)</i> in 2d and 3d, resp. |
| 47 |
* |
| 48 |
* @ingroup Polynomials |
| 49 |
*/ |
| 50 |
template <int dim> |
| 51 |
class PolynomialsRaviartThomas : public PolynomialsVectorAnisotropic<dim> |
| 52 |
{ |
| 53 |
public: |
| 54 |
/** |
| 55 |
* Constructor, using the common Raviart-Thomas space of degree `k + 1` in |
| 56 |
* normal direction and `k` in the tangential directions. |
| 57 |
* |
| 58 |
* @arg k: the degree of the Raviart-Thomas-space, which is the degree of |
| 59 |
* the largest tensor product polynomial space <i>Q<sub>k</sub></i> |
| 60 |
* contains. |
| 61 |
*/ |
| 62 |
PolynomialsRaviartThomas(const unsigned int k); |
| 63 |
|
| 64 |
/** |
| 65 |
* Variant of the n_polynomials() function taking only a single argument |
| 66 |
* `degree`, assuming `degree + 1` in the normal direction and `degree` in |
| 67 |
* the tangential directions. |
| 68 |
*/ |
| 69 |
static unsigned int |
| 70 |
n_polynomials(const unsigned int degree); |
| 71 |
|
| 72 |
// Make respective two-argument method from base class available |
| 73 |
using PolynomialsVectorAnisotropic<dim>::n_polynomials; |
| 74 |
|
| 75 |
/** |
| 76 |
* Compute the lexicographic to hierarchic numbering underlying this class, |
| 77 |
* computed as a free function. |
| 78 |
*/ |
| 79 |
static std::vector<unsigned int> |
| 80 |
get_lexicographic_numbering(const unsigned int degree); |
| 81 |
|
| 82 |
/** |
| 83 |
* @copydoc TensorPolynomialsBase::clone() |
| 84 |
*/ |
| 85 |
virtual std::unique_ptr<TensorPolynomialsBase<dim>> |
| 86 |
clone() const override; |
| 87 |
}; |
| 88 |
|
| 89 |
|
| 90 |
DEAL_II_NAMESPACE_CLOSE |
| 91 |
|
| 92 |
#endif |