Differentiable moving-mesh Voronoi fluid solver in JAX runs autodiff through mesh motion

CatAstro_Piyush · x · 2026-11-04

PMocz released differentiable-voronoi-fluids, a 2D compressible Euler solver on an Arepo-style moving Voronoi mesh written in JAX, so reverse-mode autodiff runs through the entire simulation including mesh motion.

Key trick: mesh connectivity is piecewise constant and non-differentiable, so it's computed on the host via SciPy Delaunay (Qhull) through jax.purecallback with gradient-stopped positions, while continuous face geometry stays inside JAX. It's a prototype: periodic box, no walls, no refinement, hydro only.

Original post →

More from Research

Research channel →