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 :
8 : /// \cond
9 : class Matrix;
10 : template <size_t>
11 : class Mesh;
12 : namespace Spectral {
13 : enum class Basis : uint8_t;
14 : enum class Quadrature : uint8_t;
15 : } // namespace Spectral
16 : /// \endcond
17 :
18 : namespace Spectral {
19 : /*!
20 : * \brief %Matrix used to linearize a function.
21 : *
22 : * \details Filters out all except the lowest two modes by applying
23 : * \f$\mathcal{V}^{-1}\cdot\mathrm{diag}(1,1,0,0,...)\cdot\mathcal{V}\f$ to the
24 : * nodal coefficients, where \f$\mathcal{V}\f$ is the Vandermonde matrix
25 : * computed in `modal_to_nodal_matrix(size_t)`.
26 : *
27 : * \param num_points The number of collocation points
28 : *
29 : * \see modal_to_nodal_matrix(size_t)
30 : * \see nodal_to_modal_matrix(size_t)
31 : */
32 : template <Basis BasisType, Quadrature QuadratureType>
33 1 : const Matrix& linear_filter_matrix(size_t num_points);
34 :
35 : /*!
36 : * \brief Linear filter matrix for a one-dimensional mesh.
37 : *
38 : * \see linear_filter_matrix(size_t)
39 : */
40 1 : const Matrix& linear_filter_matrix(const Mesh<1>& mesh);
41 : } // namespace Spectral
|