Fast(er)PM and Moving Mesh: JAX-native Geometric Multigrid Methods

summary

The gist

Efficient, differentiable Poisson solvers are a key component of modern particle–mesh simulations and field-level inference pipelines.<ref:2607.10983#pg1>.

In short

This work introduces a JAX-native geometric multigrid framework to solve Poisson equations in particle-mesh gravity simulations. It shows that this multigrid method is competitive with FFT solvers on fixed meshes and becomes essential for moving meshes where coordinate deformation creates complex equations. The framework enables fully differentiable simulations, allowing for adaptive force resolution in nonlinear structures.

Key concepts

Geometric Multigrid Framework
This is a specialized numerical technique for solving the Poisson equation that uses a hierarchy of grids to solve problems at different scales. It works by breaking down large problems into smaller ones and then combining the solutions, making it efficient for handling complex spatial dependencies in gravity simulations.
Moving Mesh
In this context, the mesh deforms dynamically based on particle positions, which is necessary for accurately modeling gravitational forces near dense structures. The geometric multigrid solver is specifically designed to handle the resulting variable-coefficient equations that arise from this adaptive deformation.
Warm Starting (Chebyshev Smoothed V-cycle)
This technique optimizes the iterative solving process by using information from previous time steps as a starting point for the current one. By using a warm start, the solver requires significantly fewer iterations—often just one or two V-cycles instead of many—to achieve high accuracy, saving substantial computational time.
JAX-native Differentiability
The entire simulation pipeline, from particle deposition to the final force calculation and particle updates, is written using JAX primitives. This ensures that the entire process is fully differentiable, meaning gradients can be calculated end-to-end to optimize or reconstruct models.

Terminology used across episodes

This episode discusses

The paper

Fast(er)PM and Moving Mesh: JAX-native Geometric Multigrid Methods · Read on arXiv

Benjamin Horowitz, Kavli IPMU (WPI), Center for Data-Driven Discovery, Lawrence Berkeley National Lab

Kavli Institute for Particle Physics (WPI) · Center for Data-Driven Discovery · Lawrence Berkeley National Laboratory

Efficient, differentiable Poisson solvers are a key component of modern particle--mesh simulations and field-level inference pipelines. FFT-based solvers are extremely effective on fixed Cartesian meshes, but they impose global all-to-all communication and rely on symmetries that are lost in adaptive or non-Cartesian coordinates. In this work, we present a JAX-native geometric multigrid framework for particle--mesh gravity and argue that multigrid plays two complementary roles: on fixed meshes it can be a competitive, communication-avoiding alternative to FFTs, while on moving meshes it becomes the enabling solver. For static FastPM evolution, warm-started Chebyshev multigrid acts as a defect-correction method, exploiting temporal coherence between time steps to reduce the number of V-cycles required for field-level accuracy. At large mesh sizes this reduces memory pressure and yields comparable or faster wall-clock performance than distributed FFTs, with up to a factor of two reduction in total GPU time at fixed final mesh size. We then embed the same solver in a differentiable moving-mesh particle--mesh method, where adaptive coordinate deformation produces a variable-coefficient curvilinear Poisson equation that cannot be solved by ordinary FFT diagonalization. The resulting method concentrates force resolution in nonlinear structures while retaining a regular, JAX-compilable, automatically differentiable array workflow. These results suggest geometric multigrid can be a practical bridge between fast fixed-grid PM methods and differentiable adaptive-force cosmological simulations.

Transcript

Introduction to the show: ident: Astrophysics. The day in astrophysics: observations, models and what the data forces.

Vera: I'm Vera.

Jocelyn: And I'm Jocelyn, here with Subrahmanyan.

Vera: We're looking at the paper: "Fast(er)PM and Moving Mesh".

Title and authors: Vera: So we've set the stage with the title and authors of "Fast(er)PM and Moving Mesh: JAX-native Geometric Multigrid Methods." We know this work is focused on solving the Poisson equation in particle–mesh gravity using a multigrid approach that integrates directly into JAX.

Jocelyn: And as I mentioned, it’s about making these solvers faster and more adaptable by moving away from the limitations of fixed grids or traditional FFT methods. It seems to be a way to keep things differentiable for inference pipelines too.

Subrahmanyan: I'm thinking about the authors, Horowitz and his team, because they are clearly pushing this concept toward solving problems that involve multiscale adaptive mesh refinement which we see a lot in structure formation studies.

Vera: Yeah, and they are connecting this to existing work on diffuse hydrodynamics and embedding machine learning into astrophysical flows. It shows they aren't just doing an isolated math problem; it's part of a larger modeling effort.

Jocelyn: And the implication I see is that we might start seeing more methods where you can solve these complex gravitational problems directly with JAX, rather than having to stitch together separate solvers for different mesh types.

The paper's summary: Vera: The paper summarizes their framework by saying that geometric multigrid plays two complementary roles: it’s a communication-avoiding alternative to FFTs on fixed meshes, and it becomes the enabling solver when you have moving meshes.

Jocelyn: And they go deeper by talking about specific techniques for static fast particle mesh evolution, where they use warm-started Chebyshev multigrid as a defect correction method.

Subrahmanyan: That warm start is key because it exploits temporal coherence between time steps to reduce the number of V-cycles needed for field-level accuracy. It’s a clever way to get better results without needing a ton of computation per step.

Vera: So, if we look at the numbers, they show that this warm start reduces what they call one to two V-cycles at a fixed tolerance, which makes it competitive with the FFT on a per-step basis for static simulations.

Jocelyn: That’s promising because if you can reduce the cycle count like that, it means less time spent solving the Poisson equation at every single step of the simulation.

Subrahmanyan: And as for moving meshes, they state that ordinary FFT diagonalization just doesn't work anymore because you end up with a variable-coefficient curvilinear Poisson equation.

Vera: So, the geometric multigrid is what makes it possible to solve that specific type of equation when the mesh itself is changing shape.

The paper's improvements: Jocelyn: Now let’s talk about the actual improvements they propose, because that’s where we see how this changes things on the ground. They suggest two main areas for enhancement.

Vera: First, they focus on warm-starting for static cases to get that factor of two reduction in GPU time when you're running a fixed mesh simulation.

Subrahmanyan: That reduction is significant because it means for the same final mesh size, we can run more of these simulations or get a finer field resolution without slowing down as much.

Jocelyn: And secondly, they talk about the moving-mesh scheme concentrating force resolution in nonlinear structures where those forces are most important.

Vera: That’s because the moving mesh approach uses a scalar deformation potential to contract cells around overdense regions, which directly increases the local force resolution where it matters most.

Subrahmanyan: I'm curious about that; if you concentrate the resolution there, what happens to the overall accuracy of the simulation on larger scales? Does it degrade?

Vera: The paper claims that this moving mesh improves small-scale cross-correlation and the transfer function relative to a static particle mesh calculation at fixed nominal resolution.

Jocelyn: So they’re saying that by concentrating cells in those dense regions, you get better detail on those structures while still preserving the large-scale phases of the simulation.

Conclusion: Vera: So to wrap up this discussion on "Fast(er)PM and Moving Mesh: JAX-native Geometric Multigrid Methods," the main implication is that geometric multigrid provides a useful complement to FFT-based Poisson solving in differentiable cosmological simulations.

Jocelyn: They’ve shown it's a solid tool for both fixed and moving meshes, offering speed benefits where you need them most, especially when dealing with the non-Cartesian geometry of evolving systems.

Subrahmanyan: For cosmology, this means we can use these methods more effectively when memory limits prevent us from using a much finer uniform grid or when our target observables are dominated by overdense regions.

Vera: The method adds metric construction and multigrid cycles as overhead, which the paper notes is something to consider if you’re only looking at pure speed gains.

Jocelyn: But when you look at the overall workflow, they show it provides a regular, JAX-compilable workflow that allows for end-to-end differentiation of the entire evolution.

Subrahmanyan: I just think the natural next step is coupling this moving mesh gravity solver to hydrodynamics, applying that coordinate transformation consistently to conservation laws for mass and momentum.

Vera: That seems like a logical path forward; concentrating both gravitational and hydrodynamic resolution in dynamically important regions makes sense.

Jocelyn: It’s a solid foundation for future work, showing how this framework can handle the complexity of modern astrophysical flows that we're trying to model with AI and machine learning.

More episodes

← Home