Solving the Eikonal Equation with Fast Sweeping in JAX

2025-05-11

This blog post explores solving the Eikonal equation, crucial in interface evolution and image processing, using the fast sweeping method implemented in JAX. It begins by explaining level set methods and the Eikonal equation itself. The core of the post details the fast sweeping algorithm, covering grid setup, iterative updates, and the Godunov upwind scheme. NumPy and JAX code implementations are provided, with benchmarks demonstrating JAX's significant speed advantage. The author also discusses attempts at parallelizing the algorithm and the challenges encountered.