jax_sbgeom.jax_utils.stationary module¶
Sample-then-polish: the shared building block of minimum_distance and Coil.bounding_box.
- polish_stationary(f, starts, args=None, *, tol: float = 1e-10, max_steps: int = 12)[source]¶
Newton-polish the stationary points of a smooth scalar f(x, args) from each row of starts (k, d). Sampling is the caller’s job (it chooses the starts). Derivatives use optimistix’ implicit adjoint, so nothing is differentiated through the iterations (first order: the envelope theorem).
Returns (x, converged): the polished points (k, d) and a boolean (k,). Where Newton did not converge x is the last iterate: still a valid point, but derivatives through it are not.