Skip to content

What is \(\mathcal{C}\mathtt{osmo}\mathcal{L}\mathtt{attice}\) ?

\(\mathcal{C}\mathtt{osmo}\mathcal{L}\mathtt{attice}\) in a Nutshell

\(\mathcal{C}\mathtt{osmo}\mathcal{L}\mathtt{attice}\) (\(\mathcal{CL}\)) is a modern package for lattice simulations of the non-linear dynamics of interactive fields in an expanding Universe, providing an up-to-date numerical tool for investigating the physics of the early Universe. The current version (\(\mathcal{CL}\) \(\tt v2.0\), released on July 2026) is ready to simulate the dynamics of field theories described by an action of the type

\[ \begin{eqnarray} S = - \int d^4 x \sqrt{-g}&&\left\{\class{cl-eq-scalar}{\sum_b\frac{1}{2}\partial_{\mu} \phi_b \partial^{\mu} \phi_b} + \class{cl-eq-nmc-kin}{\frac{1}{2} \partial_{\mu}\chi\partial^{\mu}\chi} + \class{cl-eq-alp-kin}{\frac{1}{2}\partial_\mu \theta\partial^\mu \theta} + \class{cl-eq-u1-kin}{(D_{\mu}^A \varphi)^{*}(D_A^{\mu} \varphi)} + \class{cl-eq-su2-kin}{(D_{\mu}\Phi )^{\dagger} (D^{\mu} \Phi)} \right.\nonumber\\[1.1em] \label{eq_actionCL} && ~~~~~~~~\left. + \class{cl-eq-u1-gauge}{\frac{1}{4} F_{\mu \nu} F^{\mu \nu}} + \class{cl-eq-su2-gauge}{\frac{1}{2}{\rm Tr}\{G_{\mu \nu}G^{\mu \nu}\}} +\class{cl-eq-nmc-coup}{\frac{1}{2}\xi R \chi^{2}} - \class{cl-eq-alp-coup}{\frac{1}{4}\frac{\theta}{\Lambda} F_{\mu \nu}\,\tilde{F}^{\mu \nu}} + V_{\rm int}(\lbrace \phi_c \rbrace,|\varphi|, |\Phi|, \chi, \theta)\right\}\,. \end{eqnarray} \]
These sectors can be activated either in isolation or simultaneously with the others — click on any highlighted term to jump to its manual chapter. More is on its way: non-minimal kinetic terms, axion–SU(2) interactions, and fluids coupled to scalar or gauge fields (see Upcoming Features).

The fields can evolve in flat space-time, or in an expanding background given by the spatially-flat Friedmann-Lemaître-Robertson-Walker (FLRW) metric, with line element (here \(\eta\) is the \(\alpha\)-time)

\[ \begin{eqnarray}\label{eq_lineFLRW} ds^2 \equiv g_{\mu\nu}dx^\mu dx^\nu = - a^{2\alpha} (\eta)d\eta^2 + a^2 (\eta) \delta_{ij} dx^i dx^j\,. \end{eqnarray} \]

In the expanding case, the fields can be evolved either over a fixed background (e.g. with fixed equation of state), or with a self-consistent expansion of the Universe, the fields themselves dictating the expansion rate via the Friedmann equations. Alongside the matter dynamics, \(\mathcal{C}\mathtt{osmo}\mathcal{L}\mathtt{attice}\) can simultaneously simulate the emission of the sourced gravitational wave (GW) backgrounds

\[ \begin{eqnarray}\label{eq_GWeomCL} \class{cl-gw-mark}{h_{ij}''-a^{-2(1-\alpha)}\nabla^2h_{ij}+(3-\alpha)\frac{a'}{a}h_{ij}'=\frac{2}{m_{p}^2a^{2(1-\alpha)}}\left[\Pi_{ij}^{\rm eff}\right]^{\rm TT} \,,} \hspace{5cm}\\ \label{eq_GWsourceCL} {\Pi}^{\text{eff}}_{ij} \equiv \partial_i {\phi}_{b} \partial_j {\phi}_{b} + \partial_i\theta \partial_j\theta + \left[(D^A_i {\varphi})^*(D^A_j {\varphi}) %+ (D_i {\Phi})^\dagger(D_j {\Phi}) + {\it c.c.}\right] - \left(a^{-2\alpha}E_i E_j + a^{-2} B_i B_j\right)\,. %- \left(a^{-2\alpha} E_i^c E_j^c + a^{-2} B_i^c B_j^c\right)\,. \end{eqnarray} \]

\(\mathcal{C}\mathtt{osmo}\mathcal{L}\mathtt{attice}\) is publicly available, and comes with a detailed manual which includes the basic instructions to start running your own simulations.

\(\mathcal{C}\mathtt{osmo}\mathcal{L}\mathtt{attice}\) Manual → \(\mathcal{C}\mathtt{osmo}\mathcal{L}\mathtt{attice}\) Installation →

\(\mathcal{CL}\) Features & Capabilities

The current version of \(\mathcal{C}\mathtt{osmo}\mathcal{L}\mathtt{attice}\) (\(\tt v2.0\), released in July 2026) can simulate the dynamics of the following sectors. Click on a box to jump to the corresponding section of the user manual:

  • Scalar–Scalar Interactions


    Interacting singlet scalar fields with arbitrary potentials.

    User Manual →

  • Abelian Scalar–Gauge Interactions


    U(1)-charged scalar fields coupled to Abelian gauge fields.

    User Manual →

  • Non-Abelian Scalar–Gauge Interactions


    SU(2) scalar doublets coupled to non-Abelian gauge fields, alone or combined with a U(1) sector.

    User Manual →

  • Axion–Gauge Interactions


    Axion-like particles (ALPs) coupled to Abelian U(1) gauge sectors through a \(\frac{\theta}{\Lambda} F\tilde{F}\) term.

    User Manual →

  • Non-Minimal Couplings (NMC) to Gravity


    Singlet scalar fields non-minimally coupled to gravity via a \(\xi R \chi^2\) interaction.

    User Manual →

  • Cosmic Defects


    Global defects (domain walls, strings, monopoles, textures) and local topological defects (e.g. local strings).

    User Manual →

  • Gravitational Waves (GWs)


    GW backgrounds sourced by scalar field theories and by Abelian U(1) scalar-gauge theories.

    User Manual →

These are some featured capabilities of \(\mathcal{C}\mathtt{osmo}\mathcal{L}\mathtt{attice}\):

High-order integrators, machine-precision constraints

\(\mathcal{C}\mathtt{osmo}\mathcal{L}\mathtt{attice}\) provides symplectic integrators with accuracy ranging from \(\mathcal{O}(\delta t^2)\) up to \(\mathcal{O}(\delta t^{10})\), and non-symplectic integrators with accuracies from \(\mathcal{O}(\delta t^2)\) up to \(\mathcal{O}(\delta t^{4})\). Appropriate observables are also provided for each algorithm, like the energy density components of each field, their relevant spectra, or dynamical constraints. Our algorithms conserve energy up to the accuracy set by the order of the evolution algorithm, reaching even machine precision in the case of the highest order integrators. Notably, our algorithms for scalar-gauge theories, either Abelian or non-Abelian, always respect the Gauss constraint to machine precision, independently of the integrator, even in the case of self-consistent expansion.

Symplectic integrators up to \(\mathcal{O}(\delta t^{10})\) Low-order Runge-Kutta up to \(\mathcal{O}(\delta t^{4})\) Gauss constraint to machine precision

Change parameters, not code

\(\mathcal{C}\mathtt{osmo}\mathcal{L}\mathtt{attice}\) is written in C++, and fully exploits the object oriented programming nature of this language, with a modular structure that separates well all the ingredients involved. This allows \(\mathcal{C}\mathtt{osmo}\mathcal{L}\mathtt{attice}\) to have a clear separation between the physics and the technical implementation details. The code is designed so that the user can simulate a given scenario with different parameters, without requiring to re-compile each time that parameter values are changed. \(\mathcal{C}\mathtt{osmo}\mathcal{L}\mathtt{attice}\) allows for an easy implementation of new models with either scalar or gauge interactions.

CMake

Built to scale

\(\mathcal{C}\mathtt{osmo}\mathcal{L}\mathtt{attice}\) is fully parallelized using both shared memory parallelization (OpenMP, POSIX Threads or GPU acceleration) and distributed parallelization (Message Passing Interface (MPI)) for use in high-performance clusters, and uses a discrete Fourier Transform parallelized in multiple spatial dimensions. This makes it ideal for probing physical problems with well-separated mass/length scales, running very high resolution simulations, or simply shortening the running time of long simulations. To provide these capabilities, \(\mathcal{C}\mathtt{osmo}\mathcal{L}\mathtt{attice}\) relies on TempLat, a general package for lattice simulations that defines field variables and their operations, by introducing its own symbolic language, and managing all aspects of dispatching workload to the available computational resources. Once you become familiar with the basic ‘vocabulary’ of the \(\mathcal{C}\mathtt{osmo}\mathcal{L}\mathtt{attice}\) and TempLat language, editing the code or implementing your own model (resembling how you would write it in the continuum), should become a simple task.

MPI + parallel FFTs

GPU Acceleration

From \(\mathcal{C}\mathtt{osmo}\mathcal{L}\mathtt{attice}\) \({\tt v2.0}\)and above, through the TempLat library, a particularly powerful new feature is the native support for GPU acceleration. This is achieved by using the Kokkos library, which allows for a single code base to be compiled and run on different architectures, including NVIDIA GPUs (via CUDA), AMD GPUs (via HIP), and multi-core CPUs (via OpenMP or Pthreads). This means that users can take advantage of the computational power of modern GPUs without having to write GPU-specific code, making it easier to run large-scale simulations efficiently. TempLat also handles the MPI distribution of the workload across many GPUs, allowing for simulations that require more memory than a single GPU can provide. Using GPUs for lattice simulations is as simple as switching a single flag in the CMake configuration, and the code will automatically handle the rest, including memory management and parallelization, see also Installation - Full details for more details.

Kokkos

What makes \(\mathcal{CL}\) different ?

A platform, not a single-purpose code

\(\mathcal{C}\mathtt{osmo}\mathcal{L}\mathtt{attice}\) is a platform, not a code dedicated to one type of simulation, such as e.g. the dynamics of interacting scalar fields in an expanding background solved by the Leapfrog algorithm. The idea is something else: \(\mathcal{C}\mathtt{osmo}\mathcal{L}\mathtt{attice}\) is a framework where one can implement any system of partial differential equations suitable for discretization on a lattice, and the corresponding associated observables. \(\mathcal{CL}\) is a package that introduces its own symbolic language, defining field variables and operations over them. Once the user becomes familiar with the basic vocabulary of the \(\mathcal{CL}\) language, they can write their own code: be it for the time evolution of interactive fields in a model of interest with whichever suitable field content, or for some other operation, like a Monte-Carlo generator for thermal configurations, it is up to the user.

Physics up front, machinery under the hood

\(\mathcal{C}\mathtt{osmo}\mathcal{L}\mathtt{attice}\) separates the physics (i.e. fields living on a lattice and operations between them) from the technical details, such as the handling of the parallelization or the Fourier transforms. A beginner user with little experience in programming, and with no experience at all in parallelization techniques, will be able to run a fully parallelized simulation of their favourite model (using hundreds of processors in a cluster if they wish), while being completely oblivious to the technical details. They will just need to write a basic model file in the language of \(\mathcal{C}\mathtt{osmo}\mathcal{L}\mathtt{attice}\), containing the details of the model that they want to simulate. At the same time, an experienced user that wants to look inside the core routines of \(\mathcal{C}\mathtt{osmo}\mathcal{L}\mathtt{attice}\) and modify, for example, the MPI-implementation, they can always do so, and perhaps even contribute to improving them.

Symbolic algebras, parallel FFTs, and more

\(\mathcal{C}\mathtt{osmo}\mathcal{L}\mathtt{attice}\) includes already a library of basic routines and field-theoretical operations. This constitutes a clear advantage when using \(\mathcal{C}\mathtt{osmo}\mathcal{L}\mathtt{attice}\) as a platform to implement a given scenario, over writing your own code from scratch. In particular, \(\mathcal{C}\mathtt{osmo}\mathcal{L}\mathtt{attice}\) comes with symbolic scalar, complex [U(1)] and SU(2) algebras, which allows the use of vectorial and matrix notations without sacrificing performances. Furthermore, \(\mathcal{C}\mathtt{osmo}\mathcal{L}\mathtt{attice}\) is MPI-based and uses a discrete Fourier Transform parallelized in multiple spatial dimensions, making it very powerful for probing physical problems with well-separated scales, running very high resolution simulations, or simply very long simulations.

\(\mathcal{CL}\) Code Versions

\(\mathcal{C}\mathtt{osmo}\mathcal{L}\mathtt{attice}\) is an ever-evolving package, and new or improved features are continuously being added. We typically release new versions of the code whenever new physics modules or new relevant lattice methods are added, though code structure improvements can also occur. Details of the different versions of the code can be found below in the \(\mathcal{C}\mathtt{osmo}\mathcal{L}\mathtt{attice}\) Version Guide. The latest version of \(\mathcal{C}\mathtt{osmo}\mathcal{L}\mathtt{attice}\) is currently \(\tt v2.0\), released in July 2026. It can be downloaded at \(\mathcal{C}\mathtt{osmo}\mathcal{L}\mathtt{attice}\) Download.

\(\mathcal{CL}\) Upcoming Features

As \(\mathcal{C}\mathtt{osmo}\mathcal{L}\mathtt{attice}\) is continuously evolving, new physics and/or technical capabilities are being constantly developed, and eventually they are made publicly available. At the time of writing this (July 2026), we are enhancing the capabilities of \(\mathcal{C}\mathtt{osmo}\mathcal{L}\mathtt{attice}\) to simulate

  • Fluid Dynamics
  • Fluid–Gauge Interactions
  • Fluid–Scalar Interactions
  • Higgs Bubble Nucleation
  • Non-Minimal Kinetic Terms
  • GWs from SU(2) Theories
  • Axion–SU(2) Interactions

As all these new physics capabilities are being developed simultaneously in parallel by different teams, it is difficult to predict which aspects will become publicly available first. It is therefore important to keep an eye on the tab \(\mathcal{C}\mathtt{osmo}\mathcal{L}\mathtt{attice}\) Version Guide, to check for new code releases, which may include new features such as new field variable definitions, options, evolution algorithms, and/or new interactions as those listed just above. All these changes are gradually incorporated in successive updated versions of \(\mathcal{C}\mathtt{osmo}\mathcal{L}\mathtt{attice}\), and whenever a new code release is made, this is announced in the \(\mathcal{C}\mathtt{osmo}\mathcal{L}\mathtt{attice}\) News tab.