Expand description
ODE solver primitives (Euler, RK4 step functions). ODE / PDE Solver Infrastructure — Minimal Primitives
These are stub primitives designed for future library integration (Bastion). They provide the foundational stepping functions; full solver loops and adaptive algorithms will be built as CJC library code on top of these.
Enums§
- SymExpr
- Symbolic expression representation for automatic symbolic differentiation.
Functions§
- adjoint_
solve - Adjoint method for Neural ODEs — O(1) memory gradient computation.
- ode_
solve_ rk4 - Full RK4 solver: integrates dy/dt = f(t, y) over [t0, t1] using
n_stepsequal steps. - ode_
solve_ rk45 - Adaptive Dormand-Prince RK45 solver.
- ode_
step_ euler - Single step of Euler’s method: y_{n+1} = y_n + h * f(t_n, y_n).
- ode_
step_ rk4 - Single step of classical RK4: 4th-order Runge-Kutta.
- pde_
laplacian_ 1d - 1D finite-difference Laplacian: d^2u/dx^2 ≈ (u[i-1] - 2*u[i] + u[i+1]) / dx^2
- pde_
step_ diffusion - Single explicit Euler step for a heat/diffusion PDE: u_{n+1} = u_n + dt * alpha * laplacian(u_n)