The field substrate
omnibias-fields is the foundational layer that the physics-informed,
geometry, and score/SDE packages build on. It was extracted from
omnibias-pinn; the old omnibias.pinn._core and
omnibias.pinn.<backend>.ops paths are transparent re-export shims, so existing
imports keep working and FieldState is a single class object.
Core pieces
| Piece | Role |
|---|---|
FieldState | the carrier of field values and the cached derivative tower |
| attribute-DSL views | ergonomic, lazy access to derivatives (field.grad, field.laplacian, …) |
SigmaCache | lazily evaluates and memoizes σⁿ so each order is computed once |
ops_registry | the registry that maps operator names to closed-form implementations |
The operator surface
The cross-backend (torch + jax) closed-form differential-operator surface:
- gradient, divergence, curl
- laplacian, hessian, jacobian
- integration, Sobolev norms
- tensor divergence, Wirtinger derivatives
from omnibias.fields.torch import gradient, laplacian, divergence
g = gradient(field, coords)
lap = laplacian(field, coords) # closed-form, via the sigma tower
How dispatch stays decoupled
Backend ops select the closed-form σ-tower path via the _omnibias_dispatch
class marker (the attribute name is omnibias.fields._core.DISPATCH_ATTR)
rather than importing concrete field classes. This is precisely why the
foundational package never imports a downstream package — keeping the dependency
graph acyclic.
The SigmaCache
The cache is the performance heart of the substrate: when several operators on
the same field need σ'', it is computed once and reused. This is what lets
a Laplacian, a Hessian, and a Sobolev penalty share work instead of each
re-evaluating the tower.
What builds on it
- PINNs — PDE residuals, conservation cages, losses.
- Geometry — metric, curvature, Laplace–Beltrami.
- Score / SDE — score, Itô generator, Fokker–Planck, composed from the gradient and Hessian ops.