spectral.FourierEquispacedBasis#
- class spectral.FourierEquispacedBasis(domain: tuple[float, float] = (0.0, 6.283185307179586), representation: str = 'real')[source]#
Bases:
SpectralBasisEquispaced Fourier basis on a periodic interval.
Methods
__init__Return Fourier differentiation matrix.
Return diagonal mass matrix for trapezoidal quadrature.
Return equispaced nodes on the periodic domain.
- diff_matrix(nodes: ndarray) ndarray[source]#
Return Fourier differentiation matrix.
- Parameters:
- nodes
np.ndarray Fourier collocation nodes
- nodes
- Returns:
np.ndarrayFourier differentiation matrix of shape (N, N)
- mass_matrix(nodes: ndarray) ndarray[source]#
Return diagonal mass matrix for trapezoidal quadrature.
- Parameters:
- nodes
np.ndarray Fourier collocation nodes
- nodes
- Returns:
np.ndarrayDiagonal mass matrix of shape (N, N)