McLachlan, a Public BSSN Code

McLachlan is a publicly available, state-of-the-art BSSN code for solving the Einstein equations. McLachlan was created in the XiRel project, with the intention of building a public code for the numerical relativity community. McLachlan should be "good enough" for "standard" calculations of black holes, neutron stars, binary systems of these, and many other cases. McLachlan uses Kranc for code generation and is based on the Cactus framework, the Carpet adaptive mesh refinement driver, and the Einstein Toolkit. It can be combined with Whisky, the EU Network GR Hydrodynamics code.

McLachlan's main authors are Peter Diener, Erik Schnetter, and Jian Tao. McLachlan is freely available under the GPL in a public git repository. You can download it with the command

 git clone
; you will also need the corresponding (necessary) Kranc version. Please email Erik Schnetter <> if you encounter problems.

Formulation, Gauge Conditions, Discretisation

McLachlan implements the so-called φ variant of the BSSN formulation with 1+log slicing and a Γ-driver shift condition. It supports both the first and second order (in time) variant of the 1+log slicing.

McLachlan uses n-th order accurate centred finite differencing stencils (for even n) with n+1-th order accurate Kreiss-Oliger dissipation. McLachlan can optionally be used with multi-patch systems, where finite differences need to take the Jacobian of the transformation between patch-local and global coordinates into account. A variety of time integrators are provided by the Cactus thorn CactusBase/MoL. The matter interface is provided by CactusEinstein/TmunuBase.