The DISPATCH Task-Based Code Framework
I will present an overview of the DISPATCH task-based adaptive mesh-refinement code framework, which is designed to host a wide variety of mesh- and particle-based solvers. The central idea is to partition large problems into many semi-independent computational tasks. For example, magnetohydrodynamic (MHD) tasks typically consist of small Cartesian 3-D data cubes (“patches”) evolved using Riemann solvers.
By arranging large numbers of such patches in a “volleyball” geometry — with small tilts and overlaps between neighboring cubes — one can cover spherical domains, or even curved space-time geometries such as Kerr black holes, while retaining the efficiency and simplicity of local Cartesian solvers.
Tasks are grouped into MPI ranks, while parallel execution is handled by a lightweight task dispatcher that dynamically schedules task updates. This results in near-embarrassingly parallel execution, allowing solver implementations to remain independent of both MPI and OpenMP details. The ability to use local time stepping provides major efficiency gains in problems spanning large spatial and temporal ranges with strong local variations.
DISPATCH is currently used in applications ranging from star formation in the interstellar medium, to 3-D non-LTE stellar atmosphere modeling for the 4MOST project, to high-resolution simulations of solar and stellar convection.
I will specifically illustrate these methods in the context of the ERC/Synergy Whole Sun project, which aims to model the Sun as a coupled multi-scale physical system. The project has now reached the stage where it is possible to simulate the entire solar convection zone, including the photosphere and optionally chromospheric and coronal physics, covering the entire solar surface.
A key strategy is a “zoom-in” methodology: starting from Whole Sun snapshots, simulations can focus on specific spatial and temporal regions of interest — such as active regions — while retaining realistic initial and boundary conditions derived from the global model. Within such zoom-in regions, additional physics can be included, for example embedding particle-in-cell solvers within MHD simulations, enabling studies of non-thermal particle acceleration in realistic solar environments.
Åke Nordlund is Professor Emeritus at the Niels Bohr Institute, University of Copenhagen, where he works with colleagues and students on methods and applications in computational astrophysics and plasma physics. During his PhD he developed the MARCS stellar atmosphere code and subsequently pioneered the first realistic three-dimensional stellar atmosphere models, including detailed radiative transfer and realistic equations of state. This work evolved into the Stagger Code and later contributed to the development of the Bifrost Code for solar and stellar atmosphere modeling. His current work focuses on the DISPATCH code framework, developed in collaboration with the RoCS center in Oslo and partners in Copenhagen, Cologne, Heidelberg, Göttingen, Barcelona, and Dartmouth. DISPATCH is used to study multi-scale astrophysical plasma processes ranging from star and planet formation to detailed solar and stellar modeling.