Expand description
ODE and PDE solver kernels.
Provides CPU-side implementations of numerical methods for ordinary and partial differential equations. In production these algorithms would generate PTX kernels for GPU execution; the CPU reference implementations here ensure correctness and serve as the algorithmic specification.
§ODE solvers
- Euler — first-order forward Euler
- RK4 — classical fourth-order Runge-Kutta
- RK45 — Dormand-Prince 4(5) with adaptive step-size control
- Implicit Euler — backward Euler for stiff systems (Newton iteration)
- BDF2 — second-order backward differentiation formula
§PDE solvers
- Heat equation (1-D) — explicit FTCS and implicit Crank-Nicolson
- Wave equation (1-D) — leapfrog / Störmer-Verlet
- Poisson equation (1-D) — direct tridiagonal solve
- Advection equation (1-D) — first-order upwind and Lax-Wendroff
Structs§
- Advection
Equation1D - 1-D advection equation solver: du/dt + a * du/dx = 0.
- Bdf2
Solver - Second-order backward differentiation formula (BDF2) solver.
- Euler
Solver - Forward Euler solver.
- Grid1D
- One-dimensional uniform grid.
- Grid2D
- Two-dimensional uniform grid.
- Heat
Equation1D - 1-D heat equation solver: du/dt = alpha * d²u/dx².
- Implicit
Euler Solver - Backward (implicit) Euler solver — suitable for stiff systems.
- OdeConfig
- Configuration for an ODE integration.
- OdeSolution
- Solution returned by an ODE solver.
- PdeConfig
- Configuration for a 1-D PDE solve.
- Poisson1D
- 1-D Poisson equation solver: -u’’ = f, with boundary conditions.
- Rk4Solver
- Classical fourth-order Runge-Kutta solver.
- Rk45
Solver - Dormand-Prince 4(5) adaptive solver (RK45).
- Step
Result - Result of a single integration step (adaptive methods).
- Wave
Equation1D - 1-D wave equation solver: d²u/dt² = c² * d²u/dx².
Enums§
- Boundary
Condition - Boundary condition type.
- OdeMethod
- Integration method selector.
Traits§
- OdeSystem
- Right-hand side of an ODE system dy/dt = f(t, y).
Functions§
- numerical_
jacobian - Compute the numerical Jacobian of an ODE system by finite differences.
- solve_
tridiagonal - Solve a tridiagonal system using the Thomas algorithm.