Debian Codegraph @

include/deal.II/fe/fe_rt_bubbles.h

raw
1 // ------------------------------------------------------------------------
2 //
3 // SPDX-License-Identifier: LGPL-2.1-or-later
4 // Copyright (C) 2018 - 2023 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_fe_raviart_thomas_bubbles_h
16 #define dealii_fe_raviart_thomas_bubbles_h
17
18 #include <deal.II/base/config.h>
19
20 #include <deal.II/base/geometry_info.h>
21 #include <deal.II/base/polynomial.h>
22 #include <deal.II/base/polynomials_rt_bubbles.h>
23 #include <deal.II/base/tensor_product_polynomials.h>
24
25 #include <deal.II/fe/fe.h>
26 #include <deal.II/fe/fe_poly_tensor.h>
27
28 #include <vector>
29
30 DEAL_II_NAMESPACE_OPEN
31
32 /**
33 * This class implements a curl-enhanced Raviart-Thomas elements,
34 * conforming with <i>H<sup>div</sup></i> space. The node functionals are
35 * defined as point values in Gauss-Lobatto points. These elements generate
36 * vector fields with normal components continuous between mesh cells. The
37 * purpose of this finite element is in localizing the interactions
38 * between degrees of freedom around the nodes when an appropriate quadrature
39 * rule is used, leading to a block-diagonal @ref GlossMassMatrix "mass matrix" (even with full-tensor
40 * coefficient).
41 *
42 * The elements are defined through enrichment of classical Raviart-Thomas
43 * elements with extra curls, so that the <i>H<sup>div</sup></i> conformity is
44 * preserved, and the total number of degrees of freedom of FE_RT_Bubbles of
45 * order k is equal to the number of DoFs in <i>dim</i> copies of FE_Q of
46 * order <i>k</i>.
47 *
48 * @note Unlike Raviart-Thomas, the lowest possible order for this
49 * enhanced finite element is 1, i.e. $k \ge 1$.
50 *
51 * The matching pressure space for FE_RT_Bubbles of order <i>k</i> is FE_DGQ of
52 * order <i>k-1</i>. With the exact integration, this pair yields $(k+1)$-st
53 * order of convergence in $L_2$-norm for a vector variable and $k$-th order in
54 * $L_2$-norm for a scalar one (same as $BDM_k \times P_{k-1}$).
55 *
56 * For this enhanced Raviart-Thomas element, the node values are not cell
57 * and face moments with respect to certain polynomials, but the values in
58 * Gauss-Lobatto quadrature points. The nodal values on edges (faces in
59 * <i>3d</i>) are evaluated first, according to the natural ordering of the
60 * edges (faces) of a cell. The interior degrees of freedom are evaluated last.
61 *
62 * For an RT-Bubbles element of degree <i>k</i>, we choose
63 * <i>(k+1)<sup>dim-1</sup></i> Gauss-Lobatto points on each face. These points
64 * are ordered lexicographically with respect to the orientation of the face.
65 * In the interior of the cells, the values are computed using an anisotropic
66 * Gauss-Lobatto formula for integration. The mass matrix assembled with the
67 * use of this same quadrature rule, is block diagonal with blocks
68 * corresponding to quadrature points. See
69 * <i><a href="https://arxiv.org/abs/1710.06742">"Higher order multipoint flux
70 * mixed finite element methods on quadrilaterals and hexahedra"</a></i> for
71 * more details.
72 *
73 * The elements of degree $k=3$ in <i>2d</i> and $k=2$ in <i>3d</i> are shown in
74 * the figures below (filled arrows indicate DoFs for which continuity across
75 * the edges (faces in <i>3d</i>) is required).
76 *
77 * <table> <tr> <td align="center">
78 * @image html rtbubbles.png
79 * </td></tr>
80 *
81 * <tr> <td align="center"> Left - $2d,\,k=3$,
82 * right - $3d,\,k=2$.</td></tr> </table>
83 *
84 * @todo Implement restriction matrices
85 */
86 template <int dim>
87 class FE_RT_Bubbles : public FE_PolyTensor<dim>
88 {
89 public:
90 /**
91 * Constructor for the RT_Bubbles element of degree @p k.
92 */
93 FE_RT_Bubbles(const unsigned int k);
94
95 /**
96 * Returns a string that uniquely identifies a finite element. This class
97 * returns <tt>FE_RT_Bubbles<dim>(degree)</tt>, with @p dim and @p
98 * degree replaced by appropriate values.
99 */
100 virtual std::string
101 get_name() const override;
102
103 virtual std::unique_ptr<FiniteElement<dim, dim>>
104 clone() const override;
105
106 // documentation inherited from the base class
107 virtual void
108 convert_generalized_support_point_values_to_dof_values(
109 const std::vector<Vector<double>> &support_point_values,
110 std::vector<double> &nodal_values) const override;
111
112 private:
113 /**
114 * Only for internal use. Its full name is @p get_dofs_per_object_vector
115 * function and it creates the @p dofs_per_object vector that is needed
116 * within the constructor to be passed to the constructor of @p
117 * FiniteElementData.
118 */
119 static std::vector<unsigned int>
120 get_dpo_vector(const unsigned int degree);
121
122 /**
123 * Compute the vector used for the @p restriction_is_additive field passed
124 * to the base class's constructor.
125 */
126 static std::vector<bool>
127 get_ria_vector(const unsigned int degree);
128
129 /**
130 * Initialize the FiniteElement<dim>::generalized_support_points and
131 * FiniteElement<dim>::generalized_face_support_points fields. Called from
132 * the constructor.
133 *
134 * See the
135 * @ref GlossGeneralizedSupport "glossary entry on generalized support points"
136 * for more information.
137 */
138 void
139 initialize_support_points(const unsigned int rt_degree);
140
141 /**
142 * Initialize the permutation pattern and the pattern of sign change.
143 */
144 void
145 initialize_quad_dof_index_permutation_and_sign_change();
146 };
147
148
149 DEAL_II_NAMESPACE_CLOSE
150
151 #endif