Versions in this module Expand all Collapse all v0 v0.8.0 Jul 19, 2026 Changes in this version + var ErrDimensionMismatch = errors.New("spectralpde: dimension mismatch") + var ErrInvalidArgument = errors.New("spectralpde: invalid argument") + var ErrSingularMatrix = errors.New("spectralpde: singular matrix") + func AXPY(a float64, x, y []float64) []float64 + func AdvectionDiffusionSolveFourier(u0 []float64, c, nu, t, L float64) []float64 + func AdvectionSolveFourier(u0 []float64, c, t, L float64) []float64 + func AffineMap(x, a, b float64) float64 + func AffineMapInverse(y, a, b float64) float64 + func ApplyFunc(f func(float64) float64, x []float64) []float64 + func BarycentricInterpolate(nodes, values, w []float64, x float64) float64 + func BarycentricInterpolateVec(nodes, values, w, xs []float64) []float64 + func BarycentricWeights(nodes []float64) []float64 + func BarycentricWeightsChebyshev(N int) []float64 + func BuildChebyshevLaplacian1D(N int, a, b float64) [][]float64 + func BuildLaplacian2D(Nx, Ny int, ax, bx, ay, by float64) [][]float64 + func ChebyshevBarycentricInterpolate(values []float64, x float64) float64 + func ChebyshevCoefficients(values []float64) []float64 + func ChebyshevDiffMatrix(N int) [][]float64 + func ChebyshevDiffMatrix2(N int) [][]float64 + func ChebyshevDiffMatrixInterval(N int, a, b float64) [][]float64 + func ChebyshevDiffMatrixOrder(N, m int) [][]float64 + func ChebyshevDifferentiateCoeffs(coeffs []float64) []float64 + func ChebyshevEvalInterval(coeffs []float64, y, a, b float64) float64 + func ChebyshevFit(f func(float64) float64, N int) []float64 + func ChebyshevFitInterval(f func(float64) float64, N int, a, b float64) []float64 + func ChebyshevGaussLobattoAngles(N int) []float64 + func ChebyshevGaussLobattoNodes(N int) []float64 + func ChebyshevGaussLobattoNodesInterval(N int, a, b float64) []float64 + func ChebyshevGaussLobattoWeights(N int) []float64 + func ChebyshevGaussNodes(N int) []float64 + func ChebyshevGaussWeights(N int) []float64 + func ChebyshevIntegral(coeffs []float64) float64 + func ChebyshevIntegrateCoeffs(coeffs []float64) []float64 + func ChebyshevInterpolantError(f func(float64) float64, N int, eval []float64) float64 + func ChebyshevInterpolate(values []float64, x float64) float64 + func ChebyshevL2Projection(f func(float64) float64, n int) []float64 + func ChebyshevRoots(n int) []float64 + func ChebyshevT(n int, x float64) float64 + func ChebyshevTDerivative(n int, x float64) float64 + func ChebyshevTValues(n int, xs []float64) []float64 + func ChebyshevTruncationError(coeffs []float64, keep int) float64 + func ChebyshevU(n int, x float64) float64 + func ChebyshevValuesFromCoeffs(coeffs []float64) []float64 + func ChebyshevVandermonde(nodes []float64, degree int) [][]float64 + func ClenshavEval(coeffs []float64, x float64) float64 + func ClenshawCurtisIntegrate(f func(float64) float64, N int, a, b float64) float64 + func ClenshawCurtisNodes(N int) []float64 + func ClenshawCurtisWeights(N int) []float64 + func ClenshawEval(coeffs []float64, x float64) float64 + func ClenshawEvalDerivative(coeffs []float64, x float64) float64 + func CoefficientDecayRate(coeffs []float64) float64 + func ComplexAbs(x []complex128) []float64 + func ComplexImag(x []complex128) []float64 + func ComplexReal(x []complex128) []float64 + func ConvergenceOrder(hs, errs []float64) float64 + func CopyMatrix(a [][]float64) [][]float64 + func DCT1(x []float64) []float64 + func DFT(x []complex128) []complex128 + func DST1(x []float64) []float64 + func Determinant(a [][]float64) (float64, error) + func Diag(v []float64) [][]float64 + func DifferentiateNodal(D [][]float64, u []float64) []float64 + func DotProduct(x, y []float64) float64 + func FFT(x []complex128) []complex128 + func FFTReal(x []float64) []complex128 + func FejerIntegrate(f func(float64) float64, n int, a, b float64) float64 + func FejerNodes(n int) []float64 + func FejerWeights(n int) []float64 + func FourierCoefficients(values []float64) []complex128 + func FourierDiffMatrix(N int) [][]float64 + func FourierDiffMatrix2(N int) [][]float64 + func FourierDiffMatrixOrder(N, m int) [][]float64 + func FourierDifferentiate(values []float64) []float64 + func FourierDifferentiate2(values []float64) []float64 + func FourierDifferentiateOrder(values []float64, m int) []float64 + func FourierInterpolate(values []float64, x float64) float64 + func FourierNodes(N int) []float64 + func FourierNodesInterval(N int, a, b float64) []float64 + func FourierWavenumbers(N int) []float64 + func FourierWeights(N int) []float64 + func FrobeniusNorm(a [][]float64) float64 + func GalerkinProjectChebyshev(f func(float64) float64, n int) []float64 + func GalerkinProjectLegendre(f func(float64) float64, n int) []float64 + func GaussChebyshevIntegrate(f func(float64) float64, n int) float64 + func GaussLegendreIntegrate(f func(float64) float64, n int, a, b float64) float64 + func HeatSolveChebyshev(u0 func(float64) float64, nu, dt float64, steps, N int, a, b float64) (nodes, u []float64, err error) + func HeatSolveFourier(u0 []float64, nu, t, L float64) []float64 + func HeatStepChebyshevCN(uInterior []float64, nu, dt float64, N int, a, b float64) ([]float64, error) + func Helmholtz2D(f, g func(x, y float64) float64, k2 float64, Nx, Ny int, ...) (xn, yn []float64, U [][]float64, err error) + func HelmholtzSolve1D(f func(float64) float64, k2 float64, N int, a, b, ua, ub float64) (nodes, u []float64, err error) + func IDCT1(x []float64) []float64 + func IDFT(x []complex128) []complex128 + func IDST1(x []float64) []float64 + func IFFT(x []complex128) []complex128 + func Identity(n int) [][]float64 + func IntegrateFunction(f func(float64) float64, nodes, weights []float64) float64 + func IntegrateWeighted(weights, values []float64) float64 + func InterpolationError(f func(float64) float64, nodes []float64, eval []float64) float64 + func IntervalScale(a, b float64) float64 + func Inverse(a [][]float64) ([][]float64, error) + func IsSpectrallyConverging(ns []int, errs []float64, rate float64) bool + func JacobiEigenSymmetric(a [][]float64) (vals []float64, vecs [][]float64, err error) + func Kron(a, b [][]float64) [][]float64 + func L2Error(a, b []float64) float64 + func LUDecompose(a [][]float64) (lu [][]float64, piv []int, sign float64, err error) + func LUSolve(lu [][]float64, piv []int, b []float64) []float64 + func LagrangeBasis(nodes []float64, j int, x float64) float64 + func LagrangeInterpolate(nodes, values []float64, x float64) float64 + func LegendreGaussLobattoNodes(N int) []float64 + func LegendreGaussLobattoNodesWeights(N int) ([]float64, []float64) + func LegendreGaussLobattoWeights(N int) []float64 + func LegendreGaussNodes(n int) []float64 + func LegendreGaussNodesWeights(n int) ([]float64, []float64) + func LegendreGaussWeights(n int) []float64 + func LegendreNormSquared(n int) float64 + func LegendreP(n int, x float64) float64 + func LegendrePDerivative(n int, x float64) float64 + func LegendrePSecondDerivative(n int, x float64) float64 + func LegendrePValues(n int, xs []float64) []float64 + func LegendreProjection(f func(float64) float64, n int) []float64 + func LegendreSeriesEval(coeffs []float64, x float64) float64 + func LegendreVandermonde(nodes []float64, degree int) [][]float64 + func LinSpace(a, b float64, n int) []float64 + func LinfError(a, b []float64) float64 + func MapFromInterval(nodes []float64, a, b float64) []float64 + func MapToInterval(nodes []float64, a, b float64) []float64 + func MatAdd(a, b [][]float64) [][]float64 + func MatMaxAbs(a [][]float64) float64 + func MatMul(a, b [][]float64) [][]float64 + func MatPow(a [][]float64, p int) [][]float64 + func MatScale(a [][]float64, s float64) [][]float64 + func MatSub(a, b [][]float64) [][]float64 + func MatVec(a [][]float64, x []float64) []float64 + func MaxAbs(x []float64) float64 + func Mean(x []float64) float64 + func NewtonDividedDifferences(nodes, values []float64) []float64 + func NewtonEval(coef, nodes []float64, x float64) float64 + func Norm1(x []float64) float64 + func Norm2(x []float64) float64 + func NormInf(x []float64) float64 + func NormP(x []float64, p float64) float64 + func Poisson2D(f, g func(x, y float64) float64, Nx, Ny int, ax, bx, ay, by float64) (xn, yn []float64, U [][]float64, err error) + func Poisson2DFourier(f func(x, y float64) float64, Nx, Ny int, Lx, Ly float64) (xn, yn []float64, U [][]float64) + func PoissonSolve1D(f func(float64) float64, N int, a, b, ua, ub float64) (nodes, u []float64, err error) + func PoissonSolve1DFourier(f func(float64) float64, N int, L float64) (nodes, u []float64) + func PolynomialInterpolate(nodes, values []float64, x float64) float64 + func RMSError(a, b []float64) float64 + func RealToComplex(x []float64) []complex128 + func RelativeL2Error(a, b []float64) float64 + func Reverse(x []float64) []float64 + func SimpsonIntegrate(f func(float64) float64, n int, a, b float64) float64 + func SolveLinearSystem(a [][]float64, b []float64) ([]float64, error) + func SolveMatrix(a, b [][]float64) ([][]float64, error) + func SpectralConvergenceRate(ns []int, errs []float64) float64 + func SpectralDerivativeChebyshev(values []float64, a, b float64) []float64 + func Sum(x []float64) float64 + func Trace(a [][]float64) float64 + func Transpose(a [][]float64) [][]float64 + func TrapezoidalIntegrate(f func(float64) float64, n int, a, b float64) float64 + func TrapezoidalWeights(n int, a, b float64) []float64 + func UniformNodes(n int, a, b float64) []float64 + func VectorAdd(x, y []float64) []float64 + func VectorCopy(x []float64) []float64 + func VectorFill(n int, v float64) []float64 + func VectorHadamard(x, y []float64) []float64 + func VectorScale(x []float64, s float64) []float64 + func VectorSub(x, y []float64) []float64 + func VectorZeros(n int) []float64 + func Zeros(r, c int) [][]float64 + type Matrix struct + Cols int + Data [][]float64 + Rows int + func NewMatrix(r, c int) *Matrix + func NewMatrixFrom(data [][]float64) *Matrix + func (m *Matrix) At(i, j int) float64 + func (m *Matrix) Clone() *Matrix + func (m *Matrix) Set(i, j int, v float64)