I review the development of direct N-body codes at Cambridge over nearly 40 years, highlighting the main stepping stones. The first code (NBODY1) was based on the simple concepts of a force polynomial combined with individual time steps, where numerical problems due to close encounters were avoided by a softened potential. Fortuitously, the elegant Kustaanheimo-Stiefel two-body regularization soon permitted small star clusters to be studied (NBODY3). Subsequent extensions to unperturbed three-body and four-body regularization proved beneficial in dealing with multiple interactions. Investigations of larger systems became possible with the Ahmad-Cohen neighbor scheme which was used more than 20 years ago for expanding universe models of 4000 galaxies (NBODY2). Combining the neighbor scheme with the regularization procedures enabled more realistic star clusters to be considered (NBODY5). After a period of simulations with no apparent technical progress, chain regularization replaced the treatment of compact subsystems (NBODY3, NBODY5). More recently, the Hermite integration method provided a major advance and has been implemented on the special-purpose HARP computers (NBODY4) together with an alternative version for workstations and supercomputers (NBODY6). These codes also include a variety of algorithms for stellar evolution based on fast lookup functions. The treatment of primordial binaries contains efficient procedures for chaotic two-body motion as well as tidal circularization, and special attention is paid to hierarchical systems and their stability. This family of N-body codes constitutes a powerful tool for dynamical simulations which is freely available to the astronomical community, and the massive effort owes much to collaborators.
MYRIAD is a C++ code for collisional N-body simulations of star clusters. The code uses the Hermite fourth-order scheme with block time steps, for advancing the particles in time, while the forces and neighboring particles are computed using the GRAPE-6 board. Special treatment is used for close encounters, binary and multiple sub-systems that either form dynamically or exist in the initial configuration. The structure of the code is modular and allows the appropriate treatment of more physical phenomena, such as stellar and binary evolution, stellar collisions and evolution of close black-hole binaries. Moreover, it can be easily modified so that the part of the code that uses GRAPE-6 could be replaced by another module that uses other accelerating-hardware like the Graphics Processing Units (GPUs). Appropriate choice of the free parameters give a good accuracy and speed for simulations of star clusters up to and beyond core collapse. The code accuracy becomes comparable and even better than the accuracy of existing codes when a number of close binary systems is dynamically created in a simulation; this is due to the high accuracy of the method that is used for close binary and multiple sub-systems. The code can be used for evolving star clusters containing equal-mass stars or star clusters with an initial mass function (IMF) containing an intermediate mass black hole (IMBH) at the center and/or a fraction of primordial binaries, which are systems of particular astrophysical interest.
The PROFIT is an IDL routine to do automated fitting of emission-line profiles by Gaussian curves or Gauss-Hermite series optimized for use in Integral Field and Fabry-Perot data cubes. As output PROFIT gives two-dimensional FITS files for the emission-line flux distribution, centroid velocity, velocity dispersion and higher order Gauss-Hermite moments (h3 and h4).
bhint is a post-Newtonian, high-precision integrator for stellar systems surrounding a super-massive black hole. The algorithm makes use of the fact that the Keplerian orbits in such a potential can be calculated directly and are only weakly perturbed. For a given average number of steps per orbit, bhint is almost a factor of 100 more accurate than the standard Hermite method.
HiGPUs is an implementation of the numerical integration of the classical, gravitational, N-body problem, based on a 6th order Hermite’s integration scheme with block time steps, with a direct evaluation of the particle-particle forces. The main innovation of this code is its full parallelization, exploiting both OpenMP and MPI in the use of the multicore Central Processing Units as well as either Compute Unified Device Architecture (CUDA) or OpenCL for the hosted Graphic Processing Units. We tested both performance and accuracy of the code using up to 256 GPUs in the supercomputer IBM iDataPlex DX360M3 Linux Infiniband Cluster provided by the italian supercomputing consortium CINECA, for values of N ≤ 8 millions. We were able to follow the evolution of a system of 8 million bodies for few crossing times, task previously unreached by direct summation codes.
HiGPUs is also available as part of the AMUSE project.
Swarm-NG is a C++ library for the efficient direct integration of many n-body systems using highly-parallel Graphics Processing Units (GPU). Swarm-NG focuses on many few-body systems, e.g., thousands of systems with 3...15 bodies each, as is typical for the study of planetary systems; the code parallelizes the simulation, including both the numerical integration of the equations of motion and the evaluation of forces using NVIDIA's "Compute Unified Device Architecture" (CUDA) on the GPU. Swarm-NG includes optimized implementations of 4th order time-symmetrized Hermite integration and mixed variable symplectic integration as well as several sample codes for other algorithms to illustrate how non-CUDA-savvy users may themselves introduce customized integrators into the Swarm-NG framework. Applications of Swarm-NG include studying the late stages of planet formation, testing the stability of planetary systems and evaluating the goodness-of-fit between many planetary system models and observations of extrasolar planet host stars (e.g., radial velocity, astrometry, transit timing). While Swarm-NG focuses on the parallel integration of many planetary systems,the underlying integrators could be applied to a wide variety of problems that require repeatedly integrating a set of ordinary differential equations many times using different initial conditions and/or parameter values.
QYMSYM is a GPU accelerated 2nd order hybrid symplectic integrator that identifies close approaches between particles and switches from symplectic to Hermite algorithms for particles that require higher resolution integrations. This is a parallel code running with CUDA on a video card that puts the many processors on board to work while taking advantage of fast shared memory.
Shapelets are a complete, orthonormal set of 2D basis functions constructed from Laguerre or Hermite polynomials weighted by a Gaussian. A linear combination of these functions can be used to model any image, in a similar way to Fourier or wavelet synthesis. The shapelet decomposition is particularly efficient for images localized in space, and provide a high level of compression for individual galaxies in astronomical data. The basis has many elegant mathematical properties that make it convenient for image analysis and processing.
OBERON (OBliquity and Energy balance Run on N-body systems) models the climate of Earthlike planets under the effects of an arbitrary number and arrangement of other bodies, such as stars, planets and moons. The code, written in C++, simultaneously computes N body motions using a 4th order Hermite integrator, simulates climates using a 1D latitudinal energy balance model, and evolves the orbital spin of bodies using the equations of Laskar (1986a,b).
PSPLINE is a collection of Spline and Hermite interpolation tools for 1D, 2D, and 3D datasets on rectilinear grids. Spline routines give full control over boundary conditions, including periodic, 1st or 2nd derivative match, or divided difference-based boundary conditions on either end of each grid dimension. Hermite routines take the function value and derivatives at each grid point as input, giving back a representation of the function between grid points. Routines are provided for creating Hermite datasets, with appropriate boundary conditions applied. The 1D spline and Hermite routines are based on standard methods; the 2D and 3D spline or Hermite interpolation functions are constructed from 1D spline or Hermite interpolation functions in a straightforward manner. Spline and Hermite interpolation functions are often much faster to evaluate than other representations using e.g. Fourier series or otherwise involving transcendental functions.
GraviDy performs N-body 3D visualizations; it is a GPU, direct-summation N-body integrator based on the Hermite scheme and includes relativistic corrections for sources of gravitational radiation. The software is modular, allowing users to readily introduce new physics, and exploits available computational resources. The software can be used in parallel on multiple CPUs and GPUs, with a considerable speed-up benefit. The single-GPU version is between one and two orders of magnitude faster than the single-CPU version.
Finesse is a numeric simulation for laser interferometers and models parametric instabilities, easily providing the required mechanical-to-optical transfer functions in imperfect and arbitrary interferometer configurations using Hermite-Gaussian beams. The code has been used to apply limits to the number and type of higher order modes used in simulation and investigate the potential use of higher order Laguerre-Gauss modes to reduce thermal noise in future gravitational wave detector designs. The PyKat wrapper (ascl:2004.014) helps automate complex Finesse tasks.
The N-body code PETAR (ParticlE Tree & particle-particle & Algorithmic Regularization) combines the methods of Barnes-Hut tree, Hermite integrator and slow-down algorithmic regularization (SDAR). It accurately handles an arbitrary fraction of multiple systems (e.g. binaries, triples) while keeping a high performance by using the hybrid parallelization methods with MPI, OpenMP, SIMD instructions and GPU. PETAR has very good agreement with NBODY6++GPU results on the long-term evolution of the global structure, binary orbits and escapers and is significantly faster when used on a highly configured GPU desktop computer. PETAR scales well when the number of cores increase on the Cray XC50 supercomputer, allowing a solution to the ten million-body problem which covers the region of ultra compact dwarfs and nuclear star clusters.