spectral.LegendreLobattoBasis#
- class spectral.LegendreLobattoBasis(domain: tuple[float, float] = (-1.0, 1.0))[source]#
Bases:
SpectralBasisLegendre-Gauss-Lobatto nodal polynomial basis.
Methods
__init__Return derivative matrix scaled to the physical domain.
Return mass matrix associated with Legendre basis.
Return nodes mapped to the configured domain.
- diff_matrix(nodes: ndarray) ndarray[source]#
Return derivative matrix scaled to the physical domain.
- Parameters:
- nodes
np.ndarray Physical domain nodes
- nodes
- Returns:
np.ndarrayScaled differentiation matrix of shape (N, N)
- mass_matrix(nodes: ndarray) ndarray[source]#
Return mass matrix associated with Legendre basis.
- Parameters:
- nodes
np.ndarray Physical domain nodes
- nodes
- Returns:
np.ndarrayScaled mass matrix of shape (N, N)