[Paper Review] CosmoLattice
CosmoLattice is a modern C++-based, MPI-parallelized lattice simulation framework for modeling scalar and gauge field dynamics in an expanding universe, featuring a symbolic field language, high-order time integrators (up to O(δt¹⁰)), and exact enforcement of Gauss's law in gauge theories. It enables high-resolution, long-duration simulations of early-universe phenomena such as preheating and phase transitions with full support for restarts and HDF5-based field saving.
This is the user manual for CosmoLattice, a modern package for lattice simulations of the dynamics of interacting scalar and gauge fields in an expanding universe. CosmoLattice incorporates a series of features that makes it very versatile and powerful: $i)$ it is written in C++ fully exploiting the object oriented programming paradigm, with a modular structure and a clear separation between the physics and the technical details, $ii)$ it is MPI-based and uses a discrete Fourier transform parallelized in multiple spatial dimensions, which makes it specially appropriate for probing scenarios with well-separated scales, running very high resolution simulations, or simply very long ones, $iii)$ it introduces its own symbolic language, defining field variables and operations over them, so that one can introduce differential equations and operators in a manner as close as possible to the continuum, $iv)$ it includes a library of numerical algorithms, ranging from $O(δt^2)$ to $O(δt^{10})$ methods, suitable for simulating global and gauge theories in an expanding grid, including the case of `self-consistent' expansion sourced by the fields themselves. Relevant observables are provided for each algorithm (e.g.~energy densities, field spectra, lattice snapshots) and we note that remarkably all our algorithms for gauge theories always respect the Gauss constraint to machine precision. In this manual we explain how to obtain and run CosmoLattice in a computer (let it be your laptop, desktop or a cluster). We introduce the general structure of the code and describe in detail the basic files that any user needs to handle. We explain how to implement any model characterized by a scalar potential and a set of scalar fields, either singlets or interacting with $U(1)$ and/or $SU(2)$ gauge fields. CosmoLattice is publicly available at www.cosmolattice.net.
Motivation & Objective
- To provide a flexible, high-performance simulation tool for studying non-perturbative dynamics of scalar and gauge fields in the early universe.
- To enable long-duration, high-resolution lattice simulations of cosmological scenarios with widely separated scales.
- To ensure exact constraint satisfaction (e.g., Gauss's law) in gauge theories through algorithmic design.
- To support user-friendly model definition via a symbolic field language and modular code structure.
- To facilitate reproducibility and scalability through MPI parallelization and HDF5-based checkpointing and restart functionality.
Proposed method
- The code is implemented in C++ using object-oriented design with clear separation between physics and numerical implementation.
- It uses MPI and parallelized discrete Fourier transforms (PFFT) for efficient multi-dimensional spatial parallelization.
- A symbolic field language allows users to define fields and differential operators in a manner close to continuum notation.
- It implements a library of numerical evolution algorithms from O(δt²) to O(δt¹⁰), suitable for both global and gauge theories.
- The Gauss constraint in U(1) and SU(2) gauge theories is enforced to machine precision in all algorithms.
- HDF5 I/O support enables saving and restarting full 3D field configurations, scale factor evolution, and simulation parameters.
Experimental results
Research questions
- RQ1How can lattice simulations of scalar and gauge fields in an expanding universe be made both highly accurate and scalable to long timescales?
- RQ2What is the most effective way to implement high-order time integrators while preserving gauge invariance and constraint satisfaction?
- RQ3How can a symbolic field language be used to simplify model definition without sacrificing performance or numerical accuracy?
- RQ4To what extent can MPI and PFFT-based parallelization improve performance for high-resolution cosmological simulations?
- RQ5How can robust checkpointing and restart mechanisms be integrated into large-scale lattice simulations without compromising data integrity?
Key findings
- The code achieves ~99% parallel efficiency (α ≈ 0.99) in benchmarks, indicating near-ideal scaling across multiple cores.
- All gauge-theory algorithms in CosmoLattice enforce the Gauss constraint to machine precision, ensuring gauge invariance throughout simulations.
- The symbolic field language allows users to define complex field equations and operators in a syntax close to continuum mathematics.
- HDF5-based I/O enables reliable saving and restarting of simulations, including full 3D field distributions and time evolution data.
- The framework supports simulations of models with self-consistent expansion, where the scale factor evolves dynamically due to field backreaction.
- The code is publicly available at http://www.cosmolattice.net and is designed for use on laptops, desktops, and high-performance clusters.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.