Expand description
Functional analysis tools for physics simulation.
Provides Hilbert and Banach spaces, operator spectrum, Sobolev spaces, functional derivatives (Gâteaux/Fréchet), and variational problems (Euler-Lagrange, Lagrange multiplier). Also includes L² inner products, Gram–Schmidt orthogonalization, Fourier/Chebyshev/Legendre expansions, Sobolev norms, and operator norm estimation via power iteration.
Structs§
- Banach
Space - A discrete Banach space with Lᵖ norm.
- Function
Space - A finite-dimensional function space spanned by a list of basis functions.
- Functional
Derivative - Gâteaux and Fréchet derivatives of functionals on function spaces.
- Hilbert
Space - A discrete Hilbert space over a uniform grid with spacing
dx. - Operator
Spectrum - Spectral analysis of compact operators represented as finite matrices.
- Sobolev
Space - A discrete Sobolev space H^k on a uniform grid.
- Variational
Problem - Variational problem solver: Euler-Lagrange equations and constrained minimization with Lagrange multipliers.
Functions§
- chebyshev_
expansion - Compute the Chebyshev expansion coefficients
cₙfor a function sampled on[-1, 1]using the discrete cosine approach. - fourier_
series_ coeffs - Compute the Fourier series coefficients
(aₙ, bₙ)forn = 0, 1, …, n_terms-1. - gram_
schmidt_ orthogonalize - Orthogonalize a set of sampled basis vectors using the modified Gram–Schmidt process in the L² inner product.
- l2_
inner_ product - Compute the discrete L² inner product
⟨f, g⟩ = dx · Σ f[i]·g[i]. - l2_norm
- Compute the discrete L² norm
‖f‖ = √(⟨f, f⟩). - legendre_
expansion - Compute the Legendre expansion coefficients for
fsampled on[-1, 1]. - operator_
norm_ estimate - Estimate the operator (spectral) norm of a matrix via power iteration.
- sobolev_
norm - Compute an approximate H^s Sobolev norm
‖f‖_{H^s}. - wavelet_
haar_ inverse - Compute the inverse Haar wavelet transform.
- wavelet_
haar_ transform - Compute the full-length in-place Haar wavelet transform.