Namespaces | Enumerations | Functions | Variables
Spectral.hpp File Reference
#include <cstddef>
#include <iosfwd>
#include <limits>
#include <utility>

Go to the source code of this file.

Namespaces

 Spectral
 Functionality associated with a particular choice of basis functions and quadrature for spectral operations.
 

Enumerations

enum  Spectral::Basis { Chebyshev, Legendre }
 The choice of basis functions for computing collocation points and weights. More...
 
enum  Spectral::Quadrature { Gauss, GaussLobatto }
 The choice of quadrature method to compute integration weights. More...
 

Functions

template<Basis BasisType, typename T >
Spectral::compute_basis_function_value (size_t k, const T &x) noexcept
 Compute the function values of the basis function \(\Phi_k(x)\) (zero-indexed).
 
template<Basis >
DataVector Spectral::compute_inverse_weight_function_values (const DataVector &) noexcept
 Compute the inverse of the weight function \(w(x)\) w.r.t. which the basis functions are orthogonal. See the description of quadrature_weights(size_t) for details.
 
template<Basis BasisType>
double Spectral::compute_basis_function_normalization_square (size_t k) noexcept
 Compute the normalization square of the basis function \(\Phi_k\) (zero-indexed), i.e. the weighted definite integral over its square.
 
template<Basis BasisType, Quadrature QuadratureType>
std::pair< DataVector, DataVectorSpectral::compute_collocation_points_and_weights (size_t num_points) noexcept
 Compute the collocation points and weights associated to the basis and quadrature. More...
 
template<Basis BasisType, Quadrature QuadratureType>
const DataVectorSpectral::collocation_points (size_t num_points) noexcept
 Collocation points. More...
 
const DataVectorSpectral::collocation_points (const Mesh< 1 > &mesh) noexcept
 Collocation points for a one-dimensional mesh. More...
 
template<Basis BasisType, Quadrature QuadratureType>
const DataVectorSpectral::quadrature_weights (size_t num_points) noexcept
 Weights to compute definite integrals. More...
 
const DataVectorSpectral::quadrature_weights (const Mesh< 1 > &mesh) noexcept
 Quadrature weights for a one-dimensional mesh. More...
 
template<Basis BasisType, Quadrature QuadratureType>
const MatrixSpectral::differentiation_matrix (size_t num_points) noexcept
 Matrix used to compute the derivative of a function. More...
 
const MatrixSpectral::differentiation_matrix (const Mesh< 1 > &mesh) noexcept
 Differentiation matrix for a one-dimensional mesh. More...
 
template<Basis BasisType, Quadrature QuadratureType, typename T >
Matrix Spectral::interpolation_matrix (size_t num_points, const T &target_points) noexcept
 Matrix used to interpolate to the target_points. More...
 
template<typename T >
Matrix Spectral::interpolation_matrix (const Mesh< 1 > &mesh, const T &target_points) noexcept
 Interpolation matrix to the target_points for a one-dimensional mesh. More...
 
template<Basis BasisType, Quadrature QuadratureType>
const MatrixSpectral::spectral_to_grid_points_matrix (size_t num_points) noexcept
 Matrix used to transform from the spectral coefficients (modes) of a function to its nodal coefficients. Also referred to as the Vandermonde matrix. More...
 
const MatrixSpectral::spectral_to_grid_points_matrix (const Mesh< 1 > &mesh) noexcept
 Transformation matrix from modal to nodal coefficients for a one-dimensional mesh. More...
 
template<Basis BasisType, Quadrature QuadratureType>
const MatrixSpectral::grid_points_to_spectral_matrix (size_t num_points) noexcept
 Matrix used to transform from the nodal coefficients of a function to its spectral coefficients (modes). Also referred to as the inverse Vandermonde matrix. More...
 
const MatrixSpectral::grid_points_to_spectral_matrix (const Mesh< 1 > &mesh) noexcept
 Transformation matrix from nodal to modal coefficients for a one-dimensional mesh. More...
 
template<Basis BasisType, Quadrature QuadratureType>
const MatrixSpectral::linear_filter_matrix (size_t num_points) noexcept
 Matrix used to linearize a function. More...
 
const MatrixSpectral::linear_filter_matrix (const Mesh< 1 > &mesh) noexcept
 Linear filter matrix for a one-dimensional mesh. More...
 

Variables

template<Basis , Quadrature >
constexpr size_t Spectral::minimum_number_of_points {std::numeric_limits<size_t>::max()}
 Minimum number of possible collocation points for a quadrature type. More...
 
template<Basis >
constexpr size_t Spectral::maximum_number_of_points = 12
 Maximum number of allowed collocation points.
 

Detailed Description

Declares functionality to retrieve spectral quantities associated with a particular choice of basis functions and quadrature.