Skip to content

A Fully Differentiable Solver for the Anisotropic Eikonal Equation

License

Notifications You must be signed in to change notification settings

UQatKIT/Eikonax

Repository files navigation

CI Docs Coverage Version Python Version License
JAX Beartype Ruff

Eikonax: A Fully Differentiable Solver for the Anisotropic Eikonal Equation

Eikonax is a pure-Python implementation of a solver for the anisotropic eikonal equation on triangulated meshes. In particular, it focuses on domains Ω either in 2D Euclidean space, or 2D manifolds in 3D Euclidean space. For a given, space-dependent parameter tensor field M , and a set Γ of initially active points, Eikonax computes the arrival times u according to

( u ( x ) , M ( x ) u ( x ) ) = 1 , x Ω , u ( x ) n ( x ) 0 , x Ω , u ( x 0 ) = u 0 , x 0 Γ .

The iterative solver is based on Godunov-type upwinding and employs global Jacobi updates, which can be efficiently ported to SIMD architectures. In addition, Eikonax implements an efficient algorithm for the evaluation of parametric derivatives, meaning the derivative of the solution vector with respect to the parameter tensor field, d u d M . More precisely, we assume that the tensor field is parameterized through some vector m , s.th. we compute d u d m = d u d M d M d m . This make Eikonax particularly suitable for the inverse problem setting, where derivative information is typically indispensable for efficient solution procedures. Through exploitation of causality in the forward solution, Eikonax can compute these derivatives through discrete adjoints on timescales much smaller than those for the forward solve.

Key Features

  • Supports anisotropic conductivity tensors
  • Works on irregular meshes
  • GPU offloading of performance-relevant computations
  • Super fast derivatives through causality-informed adjoints

Eikonax is mainly based on the JAX software library. This allows for GPU offloading of relevant computations. In addition, Eikonax makes extensive use of JAX`s just-in-time compilation and automatic differentiation capabilities.

Getting Started

Eikonax is deployed as a python package, simply install via

pip install eikonax

For development, we recommend using the great uv project management tool, for which Eikonax provides a universal lock file. To set up a reproducible environment, run

uv sync --all-groups

in the project root directory.

Documentation

The documentation provides further information regarding usage, theoretical background, technical setup and API. Alternatively, you can check out the notebooks under examples

Acknowledgement and License

Eikonax is being developed in the research group Uncertainty Quantification at KIT. It is partially based on the excellent FIM-Python tool. Eikonax is distributed as free software under the MIT License.