| 1 |
// ------------------------------------------------------------------------ |
| 2 |
// |
| 3 |
// SPDX-License-Identifier: LGPL-2.1-or-later |
| 4 |
// Copyright (C) 2021 - 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_fe_p_bubbles_h |
| 16 |
#define dealii_fe_fe_p_bubbles_h |
| 17 |
|
| 18 |
#include <deal.II/base/config.h> |
| 19 |
|
| 20 |
#include <deal.II/base/polynomials_barycentric.h> |
| 21 |
|
| 22 |
#include <deal.II/fe/fe_simplex_p.h> |
| 23 |
|
| 24 |
DEAL_II_NAMESPACE_OPEN |
| 25 |
|
| 26 |
/** |
| 27 |
* @brief Enriched version of FE_SimplexP that can be used with nodal |
| 28 |
* quadrature. |
| 29 |
* |
| 30 |
* Many explicit time integration schemes require solving a @ref GlossMassMatrix "mass matrix" at |
| 31 |
* each time step. There are various ways around this requirement - for |
| 32 |
* example, step-48 replaces the mass matrix with a diagonal approximation, |
| 33 |
* which makes the solution step trivial. In step-48, and also commonly for |
| 34 |
* tensor-product elements, this is done by computing the mass matrix with a |
| 35 |
* lower-order quadrature point based on the nodes of the finite element |
| 36 |
* (i.e., the nodal quadrature rule one obtains by using the shape functions |
| 37 |
* as an interpolatory basis). |
| 38 |
* |
| 39 |
* A major drawback of standard simplex-based finite elements is that they |
| 40 |
* cannot be used with nodal quadrature since some of the quadrature weights |
| 41 |
* end up being either zero or negative, resulting in either an unsolvable or |
| 42 |
* unstable approximation to the mass matrix. For example: the shape functions |
| 43 |
* of FE_SimplexP<2>(2) with support points at vertices have mean values of |
| 44 |
* zero so that element cannot be used with mass lumping. |
| 45 |
* |
| 46 |
* This element avoids this issue by replacing the shape functions of |
| 47 |
* FE_SimplexP with an augmented space amenable to the construction of nodal |
| 48 |
* quadrature rules. For example, on the triangle a single basis function is |
| 49 |
* added corresponding to interpolation at the centroid (and all other basis |
| 50 |
* functions are updated to preserve the partition of unity property). This |
| 51 |
* results in shape functions with positive means (i.e., a valid nodal |
| 52 |
* quadrature formula). Similarly, in 3d, the polynomial space of |
| 53 |
* FE_SimplexP<3>(2) is enriched with five additional degrees of freedom (where |
| 54 |
* four have support points at face centroids and one has a support point at the |
| 55 |
* centroid) to enable construction of valid nodal quadrature rule. |
| 56 |
* |
| 57 |
* Since this FE space includes bubbles (i.e., extra functions which are |
| 58 |
* nonzero only on element interiors), the polynomial degrees of the component |
| 59 |
* basis functions are higher than the actual approximation degree of the |
| 60 |
* element. For example, with a constructor argument <code>degree = 2</code> |
| 61 |
* in 3d, the polynomials are in fact cubic (degree 3) but the order of the |
| 62 |
* approximation is the same as if we were using quadratic (degree 2) finite |
| 63 |
* elements. |
| 64 |
* |
| 65 |
* The 2d quadratic element was first described in @cite fried1975finite. The |
| 66 |
* 3d quadratic element implemented here was first described in |
| 67 |
* @cite Geevers_2018. Higher degree elements amendable to lumping exist but |
| 68 |
* are not yet implemented in this class. |
| 69 |
*/ |
| 70 |
template <int dim, int spacedim = dim> |
| 71 |
class FE_SimplexP_Bubbles : public FE_SimplexPoly<dim, spacedim> |
| 72 |
{ |
| 73 |
public: |
| 74 |
/** |
| 75 |
* Constructor, taking the approximation degree as an argument. The |
| 76 |
* polynomial space is typically one degree higher than the approximation |
| 77 |
* space for this element: see the general documentation of this class for |
| 78 |
* more information. |
| 79 |
* |
| 80 |
* @note For <code>degree == 1</code> this element is equivalent to |
| 81 |
* FE_SimplexP(1). |
| 82 |
*/ |
| 83 |
FE_SimplexP_Bubbles(const unsigned int degree); |
| 84 |
|
| 85 |
/** |
| 86 |
* @copydoc dealii::FiniteElement::clone() |
| 87 |
*/ |
| 88 |
virtual std::unique_ptr<FiniteElement<dim, spacedim>> |
| 89 |
clone() const override; |
| 90 |
|
| 91 |
/** |
| 92 |
* Return a string that uniquely identifies a finite element. This class |
| 93 |
* returns <tt>FE_SimplexP_Bubbles<dim,spacedim>(degree)</tt>, with |
| 94 |
* @p dim, @p spacedim, and @p degree replaced by appropriate values. As |
| 95 |
* usual, @p spacedim is omitted in the codimension zero case. |
| 96 |
*/ |
| 97 |
virtual std::string |
| 98 |
get_name() const override; |
| 99 |
|
| 100 |
protected: |
| 101 |
/** |
| 102 |
* Degree of the approximation (i.e., the constructor argument). |
| 103 |
*/ |
| 104 |
unsigned int approximation_degree; |
| 105 |
}; |
| 106 |
|
| 107 |
DEAL_II_NAMESPACE_CLOSE |
| 108 |
|
| 109 |
#endif |