Skip to main contentfinslerax

Arrival time and fronts

Arrival time from a source is a scalar field satisfying a static Hamilton–Jacobi equation. One solve gives the minimum cost throughout a discrete domain; its level sets describe a moving front, and its characteristics trace optimal routes away from shocks.

From paths to a field

A fire starts at a single point in a landscape and spreads outwards. If the question is when it reaches one particular farmhouse, the cheapest path from the ignition point to that farmhouse answers it and the previous page’s machinery is enough. If the question is when it reaches every farmhouse, and where the fire line will be at four in the afternoon, then solving for one path at a time is the wrong shape of computation altogether, and enumerating all of them is hopeless.

The object that answers the second question is the arrival time itself. Fix the source and let T(x)T(x) be the least cost of reaching xx, for every point of the domain at once. This field can be computed directly rather than assembled out of individual paths. Away from the source and from shocks, its gradient lies on the unit sphere of the norm dual to FF, the one that measures covectors as FF measures vectors, Fx∗(ξ)=sup⁡{ ξ(v):Fx(v)=1 }F^*_x(\xi) = \sup\{\, \xi(v) : F_x(v) = 1 \,\}:

F∗ ⁣(x,∇T(x))=1,T=0 on the source.F^*\!\left(x, \nabla T(x)\right) = 1, \qquad T = 0 \ \text{on the source}.

The sublevel set {T≤t}\{T \leq t\} is then everything reachable on a budget of tt, which for a spreading process is the region burnt, infected or reacted by time tt, so the fire line is a level set of TT and the entire history of the front is already contained in the one field. The optimal route to a destination can be recovered by following the characteristic backwards. Its forward tangent is the vector vv that attains the supremum in F∗(x,∇T)F^*(x, \nabla T); backward tracing uses its negative. Except in the isotropic case, this is not simply the negative Euclidean gradient. At a shock several minimising routes may meet, so the characteristic is not unique there.

Loading eikonal-fronts…

eikonal-fronts

Scrub through arrival time in a wind field. The front is not a growing circle: it is carried downwind, and the level sets crowd together where progress is expensive.

What the drift does to the equation

When FF is symmetric, the dual unit sphere containing ∇T\nabla T is centred on the origin — an ellipsoid in the Riemannian case, and in the isotropic case a sphere of radius 1/c1/c, which gives the familiar equation ∣∇T∣=1/c\lvert \nabla T \rvert = 1/c. For a Randers metric in affine form F=v⊤Gv+B⊤vF = \sqrt{v^\top G v} + B^\top v the dual unit sphere is again an ellipsoid, displaced by the drift, and the equation becomes

(∇T−B)⊤ G−1 (∇T−B)=1.(\nabla T - B)^\top\, G^{-1}\, (\nabla T - B) = 1.

For fixed GG, the one-form BB translates the dual ellipsoid and breaks reversibility. It makes the arrival time grow differently with and against the drift, leaving the field asymmetric about its source even in a uniform medium. Setting B=0B = 0 leaves ∇T⊤G−1∇T=1\nabla T^\top G^{-1} \nabla T = 1, the symmetric anisotropic equation, and taking GG proportional to the identity on top of that gives the isotropic one. In the Zermelo parametrization of the previous page (G,B)(G, B) are algebraic functions of (h,W,λ)(h, W, \lambda), so both fields are derived from the same navigation data used by the geodesic solver.

The numerics follow from where BB points. An update at a grid point has to draw its information from the directions the front actually arrives from, and once there is a drift, those are no longer the directions a symmetric stencil would consult. A stencil chosen without regard to the anisotropy produces a field that is smooth, plausible and wrong, which is a harder failure to notice than a solver that visibly diverges. Constructing stencils that respect the anisotropy has a substantial literature behind it, including Mirebeau’s work on adaptive grid discretisations. The forward sweep and implicit adjoint implemented here follow Gahtan, Shpund and Bronstein (2026), with the Randers conversion performed by finslerax.

Three domains, and a gradient through the solve

EikonalSolver applies a fully anisotropic Godunov update on a dense two-dimensional Cartesian grid, alternating four directional Gauss–Seidel sweeps until convergence. MeshEikonalSolver uses local tangent-plane stencils on a triangulation, while VolumetricEikonalSolver uses a three-dimensional Cartesian stencil. All three consume Zermelo data and admit drift.

Each solve is differentiable with respect to its metric data at a memory cost independent of the number of sweeps. The converged field is a fixed point of the update operator, and the number of sweeps depends on the geometry rather than being known in advance, so differentiating by unrolling would store an unpredictable stack of intermediate fields. Instead a custom vector–Jacobian product runs an adjoint fixed-point iteration at the converged solution. The backward pass requires an additional fixed-point solve and O(1)O(1) memory in the sweep count, which is what permits an entire front computation to sit inside a training loss and a metric to be fitted to observed arrival times directly.

  • F∗F^* is the polar dual of the Minkowski norm FxF_x, and TT satisfies F∗(x,∇T)=1F^*(x, \nabla T) = 1 in the viscosity sense, which is the sense in which the equation holds across the shocks where two branches of the front meet. For F(v)=v⊤Gv+B⊤vF(v) = \sqrt{v^\top G v} + B^\top v the condition ξ(v)≤F(v)\xi(v) \leq F(v) for all vv reads ⟨ξ−B,v⟩≤v⊤Gv\langle \xi - B, v\rangle \leq \sqrt{v^\top G v}, which is exactly ∥ξ−B∥G−1≤1\lVert \xi - B \rVert_{G^{-1}} \leq 1. Hence the shifted-ellipsoid form quoted above.

    The two-dimensional Cartesian discretisation uses fast sweeping: repeated directional Gauss–Seidel passes, each accepting the smaller of the current value and a two-point Godunov update built from the anisotropic stencil, run to steady state. The implementation carries a sentinel for unreached nodes and a validity ceiling on the two-point update, so a domain whose true arrival times exceed that ceiling has to be rescaled before solving.

    Gradients with respect to (G,B)(G, B) are supplied through jax.custom_vjp. Neither the spray nor the connection is involved anywhere in this path through the library: the solvers read the affine form off the metric’s Zermelo data and return the field and its adjoint.