Skip to main content

Module ode

Module ode 

Source
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_steps equal 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)