SWIFT: A modern highly-parallel gravity and smoothed particle hydrodynamics solver for astrophysical and cosmological applications
Creators: name: Schaller, Matthieu
name: Borrow, Josh
name: Draper, Peter W.
name: Ivkovic, Mladen
name: McAlpine, Stuart
name: Vandenbroucke, Bert
name: Bahé, Yannick
name: Chaikin, Evgenii
name: Chalk, Aidan B. G.
name: Chan, Tsang Keung
name: Correa, Camila
name: van Daalen, Marcel
name: Elbers, Willem
name: Gonnet, Pedro
name: Hausammann, Loïc
name: Helly, John
name: Huško, Filip
name: Kegerreis, Jacob A.
name: Nobels, Folkert S. J.
name: Ploeckinger, Sylvia
name: Revaz, Yves
name: Roper, William J.
name: Ruiz-Bonilla, Sergio
name: Sandnes, Thomas D.
name: Uyttenhove, Yolan
name: Willis, James S.
name: Xiang, Zhen
Publisher: name: arXiv
Year: 2023
Subjects: subject: Instrumentation and Methods for Astrophysics (astro-ph.IM)
subject: Cosmology and Nongalactic Astrophysics (astro-ph.CO)
subject: Earth and Planetary Astrophysics (astro-ph.EP)
subject: Astrophysics of Galaxies (astro-ph.GA)
subject: Distributed, Parallel, and Cluster Computing (cs.DC)
subject: FOS: Physical sciences
subject: FOS: Physical sciences
subject: FOS: Computer and information sciences
subject: FOS: Computer and information sciences

description: Numerical simulations have become one of the key tools used by theorists in all the fields of astrophysics and cosmology. The development of modern tools that target the largest existing computing systems and exploit state-of-the-art numerical methods and algorithms is thus crucial. In this paper, we introduce the fully open-source highly-parallel, versatile, and modular coupled hydrodynamics, gravity, cosmology, and galaxy-formation code SWIFT. The software package exploits hybrid shared- and distributed-memory task-based parallelism, asynchronous communications, and domain-decomposition algorithms based on balancing the workload, rather than the data, to efficiently exploit modern high-performance computing cluster architectures. Gravity is solved for using a fast-multipole-method, optionally coupled to a particle mesh solver in Fourier space to handle periodic volumes. For gas evolution, multiple modern flavours of Smoothed Particle Hydrodynamics are implemented. SWIFT also evolves neutrinos using a state-of-the-art particle-based method. Two complementary networks of sub-grid models for galaxy formation as well as extensions to simulate planetary physics are also released as part of the code. An extensive set of output options, including snapshots, light-cones, power spectra, and a coupling to structure finders are also included. We describe the overall code architecture, summarise the consistency and accuracy tests that were performed, and demonstrate the excellent weak-scaling performance of the code using a representative cosmological hydrodynamical problem with $\approx$$300$ billion particles. The code is released to the community alongside extensive documentation for both users and developers, a large selection of example test problems, and a suite of tools to aid in the analysis of large simulations run with SWIFT.
description: 43 pages, 20 figures, accepted for publication in MNRAS. Code, documentation, and examples available at www.swiftsim.com