PoliSpectralTools.jl

Boundary-value and PDE solvers built on spectral collocation (Chebyshev and Legendre) for Julia.

Get Started

julia> using Pkg; Pkg.activate(\"PoliSpectralTools\")
julia> Pkg.instantiate()
julia> using PoliSpectralTools
julia> using PoliSpectralTools.Chebyshev, PoliSpectralTools.BVP
        

Feature Highlights

Example Showcase

Diffusion decay

Diffusion decay example generated by examples/diffusion.jl comparing RK4 with the analytic solution.

Diffusion GIF

Animation showing the mode decaying over time.

Wave mode

Standing-wave snapshot showing the solver’s ability to enforce mixed boundary conditions.

Wave animation

Animation of the standing mode oscillation.

Poisson surface

Manufactured Poisson solution on a square domain, solved via the Kronecker approach.

Poisson rotation

Rotating view of the Poisson surface.

API Cheatsheet

FunctionDescriptionWhen to Use
solve_linear_bvp(a,b,c,rhs; ...)Second-order linear ODE with Lobatto nodes.Variable-coefficient problems on 1D intervals.
solve_nonlinear_bvp(g; ...)Newton iteration for y'' = g(x,y,y').Nonlinear steady states; supply derivatives if available.
solve_diffusion_1d(u0,tspan; ...)MOL + RK4 with optional forcing.Parabolic PDEs requiring high spatial accuracy.
solve_wave_1d(u0,v0,tspan; ...)Leapfrog scheme enforcing mixed BCs.1D acoustics / string dynamics with CFL control.
solve_poisson_2d(f; ...)Kronecker solve on tensor-product grids.Manufactured solutions, electrostatics on rectangles.

Example & Test Progress

#ScenarioStatus
1Chebyshev linear BVPReady
2Diffusion decayReady
3Legendre linear BVPReady
4Nonlinear BVP NewtonReady
5Wave mixed BCsReady
6Traveling pulse waveIn progress
7Forced diffusionIn progress
8Poisson squareIn progress
9Poisson rectangular domainIn progress
10Mapping-enhanced solverIn progress

See EXAMPLES_TEST_PLAN.md or the detailed example guide for definitions.

Contribute

Run include(\"test/runtests.jl\") before opening a PR. Implement missing examples/tests and drop additional images in docs/assets/ to enrich this page.