Line data Source code
1 0 : // Distributed under the MIT License.
2 : // See LICENSE.txt for details.
3 :
4 : #pragma once
5 :
6 : #include <cstddef>
7 : #include <utility>
8 :
9 : /// \cond
10 : class DataVector;
11 : template <size_t>
12 : class Mesh;
13 : namespace Spectral {
14 : enum class Basis : uint8_t;
15 : enum class Quadrature : uint8_t;
16 : } // namespace Spectral
17 : /// \endcond
18 :
19 : namespace Spectral {
20 : /// @{
21 : /*!
22 : * \brief Interpolates values from the boundary into the volume, which is needed
23 : * when applying time derivative or Bjorhus-type boundary conditions in a
24 : * discontinuous Galerkin scheme using Gauss points.
25 : *
26 : * Assumes that the logical coordinates are \f$[-1, 1]\f$.
27 : * The interpolation is done by assuming the time derivative correction is zero
28 : * on interior nodes. With a nodal Lagrange polynomial basis this means that
29 : * only the \f$\ell^{\mathrm{Gauss-Lobatto}}_{0}\f$ and
30 : * \f$\ell^{\mathrm{Gauss-Lobatto}}_{N}\f$ polynomials/basis functions
31 : * contribute to the correction. In order to interpolate the correction from the
32 : * nodes at the boundary, the Gauss-Lobatto Lagrange polynomials must be
33 : * evaluated at the Gauss grid points. The returned pair of `DataVector`s stores
34 : *
35 : * \f{align*}{
36 : * &\ell^{\mathrm{Gauss-Lobatto}}_{0}(\xi_j^{\mathrm{Gauss}}), \\
37 : * &\ell^{\mathrm{Gauss-Lobatto}}_{N}(\xi_j^{\mathrm{Gauss}}).
38 : * \f}
39 : *
40 : * This is a different correction from lifting. Lifting is done using the mass
41 : * matrix, which is an integral over the basis functions, while here we use
42 : * interpolation.
43 : *
44 : * \warning This can only be called with Gauss points.
45 : */
46 1 : const std::pair<DataVector, DataVector>& boundary_interpolation_term(
47 : const Mesh<1>& mesh);
48 :
49 : template <Basis BasisType, Quadrature QuadratureType>
50 1 : const std::pair<DataVector, DataVector>& boundary_interpolation_term(
51 : size_t num_points);
52 : /// @}
53 : } // namespace Spectral
|