A novel algorithm for GPU-accelerated particle-mesh interactions implemented in the Quokka code 2025 A novel algorithm for GPU-accelerated particle-mesh interactions implemented in the Quokka code – A.2
Chong-Chong He, Benjamin D. Wibking, Aditi Vijayan, Mark R. Krumholz, Pak Shing Li · 2025
Read A novel algorithm for GPU-accelerated particle-mesh interactions implemented in the Quokka code 2025 A novel algorithm for GPU-accelerated particle-mesh interactions implemented in the Quokka code – A.2 by Chong-Chong He, Benjamin D. Wibking, Aditi Vijayan, Mark R. Krumholz, Pak Shing Li (2025) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2509-18261.txt.
Introduction
Chong-Chong He and 4 co-authors speed up how particles and grids swap mass and heat in galaxy sims. Their 2025 paper is built into QUOKKA, a GPU-native code for radiation and magnet flow. Past ways to find particle neighbours or sort them scale poorly across many GPU nodes.
Their scheme runs in two stages through a buffer grid with ghost zones. Shares are summed with atomic adds, then sent across memory ranks. Cell-wise caps keep the real grid physical, such as holding density above zero. Tests span gas inflow and blast waves, and scaling held near half strength on thousands of GPUs.
Catalog record
| CREATOR | Chong-Chong He, Benjamin D. Wibking, Aditi Vijayan, Mark R. Krumholz, Pak Shing Li |
|---|---|
| YEAR | 2025 |
| COLLECTION | PAPERS |
| FORMAT | TXT |
| FILE SIZE | 79 KB |
| VERSION | 1.0 |
| LICENSE | http://creativecommons.org/licenses/by/4.0/ |
| RIGHTS | CC BY |
| SOURCE | arXiv |
Source: https://arxiv.org/abs/2509-18261
Browse the full library · About the Tower of Babel
Full text
The opening of the work, from the library's hosted text:
A novel algorithm for GPU-accelerated particle-mesh interactions implemented in the Quokka code 2025 A novel algorithm for GPU-accelerated particle-mesh interactions implemented in the Quokka code – A.2 Chong-Chong He, Benjamin D. Wibking, Aditi Vijayan, Mark R. Krumholz, Pak Shing Li Abstract We present a novel, GPU-optimized algorithm for particle-mesh interactions in grid-based hydrodynamics simulations, designed for massively parallel architectures. This approach overcomes the inefficiency of particle neighbour searches or sorts across multiple GPU nodes by using a new “particle-mesh-particle” interaction scheme, which extends the particle-mesh method for self-gravity. The algorithm proceeds in two main stages: first, quantities exchanged between particles and the mesh – such as mass, energy, and momentum added by stellar feedback or removed by accretion onto a sink – are deposited into a buffer mesh equipped with ghost zones, where multiple contributions per cell are accumulated using atomic additions and then communicated across distributed memory ranks. In the second stage, the buffer states are applied to real mesh states, incorporating cell-wise limiters to enforce physical constraints such as positive density. We implement this scheme in the GPU-native radiation-magnetohydrodynamics code Quokka , demonstrating its application to both supernova feedback and sink particle accretion. We demonstrate that the former scheme converges in the terminal radial momentum from multiple supernovae across varying spatial resolutions, while for the latter simulations of accretion in several configurations show excellent agreement with analytic solutions. This scheme enables efficient, scalable particle-mesh coupling for GPU-optimized simulations. 1 Introduction Gravitational collapse is ubiquitous in gaseous astrophysical systems, but following collapsing regions in hydrodynamic simulations demands ever-increasing spatial and temporal resolution. It is therefore inevitable in such calculations that one must define a maximum resolution beyond which one does not follow further collapse. One standard approach to this problem is to replace unresolved high-density peaks with point masses that approximate the behaviour and evolution of unresolved small-scale structures, with may represent individual (proto-)stars, stellar populations, black holes, or similar compact objects. Subsequent to the creation of these particles, gas and particles are integrated simultaneously, including their mutual gravitational forces and possibly also interaction via other mechanisms such as radiation. The integration of particles into hydrodynamic simulations has emerged as a vital approach in understanding complex astrophysical processes, from star formation and stellar feedback to black hole accretion. Bate et al. 1995 first introduced the technique of sink particles – particles that can accrete gas in addition to interacting with it gravitationally – in smoothed particle hydrodynamics (SPH) codes, while Krumholz et al. 2004 pioneered their use in grid-based codes. Over the past two decades, similar implementations have appeared in various hydrodynamics codes, including gadget ( Jappsen et al. 2005 ) , flash ( Federrath et al. 2010 ) , enzo ( Wang et al. 2010 ) , Ramses ( Dubois et al. 2010 ; Bleuler & Teyssier 2014 ) , and Athena ( Gong & Ostriker 2013 ) . Most of these authors primarily focus on star formation simulations, but some also employ sink particles to model supermassive black holes in cosmological contexts. In addition to accretion, particles are also frequently used as sources of feedback in hydrodynamic simulations. The oldest example of this is supernova feedback in simulations of galaxy formation, wherein gas above some density threshold is converted to collisionless particles that subsequently add energy back to the hydrodynamic particles or grid; the literature contains numerous recipes for treating this process ( Katz 1992 ; Oppenheimer & Davé 2006 ; Dalla Vecchia & Schaye 2012 ; Kimm & Cen 2014 ; Kim & Ostriker 2017 ; Hopkins et al. 2018 ; Hirashima et al. 2025 , e.g.,) . Other examples include particles representing stars that produce ionizing radiation ( Dale et al. 2005 ; Dale et al. 2007 , e.g.,) , thermal radiation ( Krumholz et al. 2007 ; Krumholz et al. 2009 ; Offner et al. 2009 , e.g.,) , protostellar jets ( Cunningham et al. 2011 , e.g.,) , and massive stellar winds ( Dale et al. 2014 ; Gatto et al. 2017 , e.g.,) , as well as particles representing black holes that similarly exert energetic and thermal feedback on the gas around them ( Springel et al. 2005 ; Di Matteo et al. 2005 , e.g.,) . All of the algorithms above have been implemented in codes that run on CPU-based architectures, but these are now giving way to more powerful GPU-based systems that present particular programming challenges. Even on CPUs, neighbour searches often represent a major contributor to the computational cost in particle-based hydrodynamics methods, and this problem is worse on GPUs, where efficiency is limited by the data dependencies and irregular memory access patterns inherent to such methods. When running in parallel, the neighbour list generation step requires exchanging particles across all nodes, which becomes inefficient on multiple GPU nodes due to complex synchronization and communication needs. For instance, in GPU-accelerated SPH codes like that of Crespo et al. 2011 , the calculation of interactions between a target particle and its neighbours represents the most computationally expensive step. One might think that particle-mesh methods, in which one follows the hydrodynamics on a mesh while allowing particles to interact with that mesh, would avoid these challenges and allow efficient computation on GPUs. This is true to some extent. Meshes have the advantage of eliminating the neighbour search, since it is trivial to determine the computational cell in which a particular particle is located, and this in turn allows efficient deposition of particle information onto a grid, and conversely interpolation of mesh data back to particles; GPU-accelerated codes such as Nyx ( Almgren et al. 2013 ) and WarpX ( Fedeli et al. 2022 ) exploit this capability to achieve high performance for particle-mesh (PM) gravity and particle-in-cell (PIC) plasma simulations, respectively. However, in these applications particle-mesh interactions are far simpler than is the case for either sink accretion or stellar feedback; particle deposition to the mesh in both PM and PIC simulations is simply additive, but this is not the case for either accretion or feedback, which usually involve complex particle-mesh interaction rules that are problematic to implement on GPU. As one example of this difficulty, most recent implementations of supernova feedback ( Kim & Ostriker 2017 ; Hopkins et al. 2018 ; Hirashima et al. 2025 ) involve modifying the properties of cells or particles within some distance of the explosion site with recipes such that the results when multiple supernovae occur are strongly dependent on the order in which the particles contributing supernovae are processed; that is, the results of adding supernova feedback from particle A and then B is not the same as the result of doing so from B and then A. On a CPU one can resolve this issue simply by enforcing an order in which the particles are processed, but ensuring serially-ordered processing of particles that are potentially distributed across multiple nodes in memory is either impossible or prohibitively expensive on GPUs. To make matters worse, if multiple GPUs need to process the supernova feedback recipe (for example because the supernovae are occurring at the edge of a domain decomposition), there is no easy way to guarantee that they will do so in the same