Line data Source code
1 0 : // Distributed under the MIT License.
2 : // See LICENSE.txt for details.
3 :
4 : #pragma once
5 :
6 : #include "NumericalAlgorithms/Spectral/Basis.hpp"
7 : #include "NumericalAlgorithms/Spectral/Quadrature.hpp"
8 :
9 0 : namespace Filters::detail {
10 : // Returns true if `basis` is a Legendre or Chebyshev basis collocated on
11 : // Gauss or Gauss-Lobatto points, i.e. a standard one-dimensional spectral
12 : // direction usable by the exponential filter engine.
13 : inline bool is_legendre_or_chebyshev(const Spectral::Basis basis,
14 : const Spectral::Quadrature quadrature) {
15 : return (basis == Spectral::Basis::Legendre or
16 : basis == Spectral::Basis::Chebyshev) and
17 : (quadrature == Spectral::Quadrature::Gauss or
18 : quadrature == Spectral::Quadrature::GaussLobatto);
19 : }
20 : } // namespace Filters::detail
|