Skip to content

jNO — jax Numerical Operators

jNO is a JAX library for differentiable numerical methods. Finite elements, finite differences, finite volumes, spectral methods, RCWA and PEEC sit next to PINNs, neural operators and Bayesian inference on one substrate: you write the mathematics (a weak form, a strong-form stencil, a PDE residual, a data loss) and it becomes a single jit-compiled, GPU-ready graph that is differentiable end to end.

Because every solve is differentiable, things that are usually separate tools are the same tool here: an inverse problem, a PDE-constrained optimisation and a neural-network coefficient are each one composition away from a forward solve.

Get started

  • Install

    Pip, Pixi or Docker. CPU out of the box, GPU one extra away.

  • Quickstart

    A 2-D Poisson problem end to end: domain, residual, solve, evaluate.

  • Tutorials

    59 worked problems, from first steps to coupled multiphysics, each checked against a reference.

  • Showcase

    Eight short programs, each showing a different side of jNO.

  • Concepts and Glossary

    The one tracing system behind PINNs, operators, FEM and FDM, and the words the docs use.

  • API reference

    Generated from the docstrings: jno.core, jno.domain, jno.np, jno.solve, jno.precond and more.

One term list, weak or strong form

The same boundary-value problem — \(-\Delta u = 1\) on the unit square, \(u = 0\) on the boundary — written twice. Only the form changes; the language does not.

import jno

d = jno.shape.rect(0, 0, 1, 1, size=0.05).domain()
xi, yi, _ = d.variable("interior", split=True)
xb, yb, _ = d.variable("boundary", split=True)

# FEM — the WEAK form is the term list (with a test function v):
u, v = d.fem_symbols()
ui, vi = u.bind(x=xi, y=yi), v.bind(x=xi, y=yi)
u_fem = jno.fem([ui.x * vi.x + ui.y * vi.y - 1.0 * vi,   # ∫∇u·∇v − ∫f·v = 0
                 u(xb, yb) - 0.0]).solve()

# FDM — the STRONG form: the same term list, no test function, collocated at the nodes:
w  = d.unknown()
wi = w.bind(x=xi, y=yi)
u_fdm = jno.fdm([-wi.xx - wi.yy - 1.0,                   # −Δu = 1
                 w(xb, yb) - 0.0]).solve()

Both are sparse, matrix-free, GPU-ready, and end-to-end differentiable — which is what makes the next section possible: wrap either in an objective and the gradient comes back through the solve.

From the tutorials

What works today

Maturity is stated per capability; each link goes to the page that documents it.

Capability Maturity Notes
FEM, nodal — jno.fem stable Lagrange P1 / P2 / P3+, 2-D & 3-D; steady (linear + Newton), transient (θ-method), second-order-in-time (wave / elastodynamics), complex, periodic, coupled multifield
FEM, non-nodal — H(div) / H(curl) / C¹ experimental Raviart–Thomas (H(div)) and Nédélec edge (H(curl) — Maxwell, eddy currents) elements; C¹ Hermite / Argyris / Morley (plates, biharmonic)
Quadrilateral & hexahedral cells beta Tensor-product cells with local refinement and hanging nodes
FDM — jno.fdm stable Strong-form collocation from a term list; structured grids + geometric multigrid; unstructured meshes; periodic, coupled, flux BCs; vector unknowns (Navier–Stokes, elasticity); stencils chosen with jno.fd(order=, points=, upwind=, fit=, …); 2-D & 3-D
Spectral / RCWA — jno.rcwa stable Vector-Maxwell RCWA, anisotropic media, Jones / polarization readout
FVM — jno.fvm beta The fdm constraint list by finite volumes, cell- or vertex-centred, 1-D to 3-D; Rusanov, HLL and Roe fluxes with limiters; systems of conservation laws; incompressible flow (Rhie–Chow, SIMPLE, PISO)
PEEC — jno.peec beta Partial-element equivalent circuits: inductance and resistance of conductor layouts, DC to MHz
Coupling — problems on their own meshes beta FEM, FDM and FVM problems joined through interface conditions (values, fluxes, loads), steady or window by window, axisymmetric, differentiable
Domain decomposition beta FEM, FDM and PINN subdomains in one problem
Linear & nonlinear solvers — jno.solve / jno.precond stable Sparse-direct LU, Jacobi-BiCGStab, GMRES, CG, MINRES, Chebyshev, geometric multigrid, optional GPU AMG — matrix-free and differentiable
Generalized eigenproblems — fem.eigs beta K x = λ M x, differentiable, M-orthonormal; photonic band structure through a Bloch tie; contour integration for every mode in a region of the complex plane, differentiable through the eigenvectors
Time integration stable θ-method (backward-Euler / Crank–Nicolson), BDF2, SDIRK, Rosenbrock, exponential integrators, adaptive step size, all through fem.solve(time=…); jno.fdm takes the same slot (tested there: θ, BDF2, adaptive; the exponential integrator is refused)
Adaptive & moving meshes beta Hessian-metric remeshing (AFEM), r-adaptivity, moving meshes stated in the term list
Differentiable inverse / PDE-constrained stable Recover a scalar, a field k(x), the geometry, or a neural coefficient through any solve — the gradient flows through the whole march
Geometry — jno.shape / jno.Path stable CSG via gmsh-OCC; conforming multi-material regions
Capability Maturity Notes
Forward PINNs (residual minimisation) stable Hard or soft BC enforcement
Variational PINNs (weak-form losses) stable Network trial functions against the FEM weak form
Residual norms (r.norm("H-1"), L2, H^s losses) beta Grid (any s) or P1 mesh (s = ±1) backend, picked from the domain
Operator learning (DeepONet, FNO, U-Net, PROSE via foundax) stable PDE-residual or data-driven
Adaptive resampling (RAD, RARD, CR3, R3, pinnfluence) stable
Stochastic PDEs & noise nodes (gaussian / uniform / laplace) stable Fokker–Planck, stochastic forcing
Generative modelling (flow matching) beta Model.flow marches a network as an ODE velocity; the training objective is one term. Heun fixed-step, no log-density
Bayesian PINNs (NUTS, HMC, MALA, SGLD, SGHMC, VI) stable model.bayesian(kernel_factory) mirrors .optimizer() — per-parameter, mixed freely
Parameter-efficient fine-tuning (LoRA, DoRA, rsLoRA, PiSSA, VeRA, LoKr, OFT, IA3) stable Chain .lora(...) on any wrapped model
Training explainability (gradient conflict, NTK, Hessian, loss landscape, input sensitivity) stable
Foundation-model integration (foundax MLPs, transformers, DeepONet, FNO, PROSE) stable Wrap any Equinox module via jno.nn(...)
Hybrid data + model parallelism stable jno.core(..., mesh=(batch, model))
Hyperparameter / architecture search beta Grid + Nevergrad
W&B logging + Orbax checkpointing stable
IREE / MLIR compiled inference for deployment stable

Cite jNO

Citing helps us justify continued development. See the Cite this repository button on GitHub (reads CITATION.cff) or copy the BibTeX entry from the README. The design is described in arXiv:2605.10159.