A fast recursive coordinate bisection tree for neighbour search and gravity
arXiv:1108.0028 · doi:10.1111/j.1365-2966.2011.19528.x
Abstract
We introduce our new binary tree code for neighbour search and gravitational force calculations in an N-particle system. The tree is built in a "top-down" fashion by "recursive coordinate bisection" where on each tree level we split the longest side of a cell through its centre of mass. This procedure continues until the average number of particles in the lowest tree level has dropped below a prescribed value. To calculate the forces on the particles in each lowest-level cell we split the gravitational interaction into a near- and a far-field. Since our main intended applications are SPH simulations, we calculate the near-field by a direct, kernel-smoothed summation, while the far field is evaluated via a Cartesian Taylor expansion up to quadrupole order. Instead of applying the far-field approach for each particle separately, we use another Taylor expansion around the centre of mass of each lowest-level cell to determine the forces at the particle positions. Due to this "cell-cell interaction" the code performance is close to O(N) where N is the number of used particles. We describe in detail various technicalities that ensure a low memory footprint and an efficient cache use. In a set of benchmark tests we scrutinize our new tree and compare it to the "Press tree" that we have previously made ample use of. At a slightly higher force accuracy than the Press tree, our tree turns out to be substantially faster and increasingly more so for larger particle numbers. For four million particles our tree build is faster by a factor of 25 and the time for neighbour search and gravity is reduced by more than a factor of 6. In single processor tests with up to 10^8 particles we confirm experimentally that the scaling behaviour is close to O(N). The current Fortran 90 code version is OpenMP-parallel and scales excellently with the processor number (=24) of our test machine.
12 pages, 16 figures, 1 table, accepted for publication in MNRAS on July 28, 2011
References in corpus (7)
- SPLASH: An interactive visualisation tool for Smoothed Particle Hydrodynamics simulations
- Producing ultra-strong magnetic fields in neutron star mergers
- Prelude to a double degenerate merger: the onset of mass transfer and its impact on gravitational waves and surface detonations
- Astrophysical Smooth Particle Hydrodynamics
- MAGMA: a 3D, Lagrangian magnetohydrodynamics code for merger applications
- Simulating Black Hole White Dwarf Encounters
- VINE -- A numerical code for simulating astrophysical systems using particles II: Implementation and performance characteristics
Cited by in corpus (31)
- Phantom: A smoothed particle hydrodynamics and magnetohydrodynamics code for astrophysics
- HACC: Simulating Sky Surveys on State-of-the-Art Supercomputing Architectures
- Can non-ideal magnetohydrodynamics solve the magnetic braking catastrophe?
- Tidal disruption events from supermassive black hole binaries
- Tidal Disruption Disks Formed and Fed by Stream-Stream and Stream-Disk Interactions in Global GRHD Simulations
- Relativistic effects on tidal disruption kicks of solitary stars
- Post-periapsis pancakes: sustenance for self-gravity in tidal disruption events
- Tidal disruptions by rotating black holes: relativistic hydrodynamics with Newtonian codes
- GANDALF - Graphical Astrophysics code for N-body Dynamics And Lagrangian Fluids
- Magnetic field evolution in tidal disruption events
- The impact of non-ideal magnetohydrodynamics on binary star formation
- The Lagrangian hydrodynamics code MAGMA2
- On the fragmentation boundary in magnetised self-gravitating discs
- The role of collision speed, cloud density, and turbulence in the formation of young massive clusters via cloud-cloud collisions
- Tidal disruption by extreme mass ratio binaries and application to ASASSN-15lh
- The formation and early evolution of embedded star clusters in spiral galaxies
- MODA: a new algorithm to compute optical depths in multi-dimensional hydrodynamic simulations
- Ultra-deep tidal disruption events: prompt self-intersections and observables
- Simulating neutron star mergers with the Lagrangian Numerical Relativity code SPHINCS_BSSN
- Streams collision as possible precursor of double tidal disruption events
- Simulating Hydrodynamics in Cosmology with CRK-HACC
- Calibration of the Advanced Spectral Leakage scheme for neutron star merger simulations, and extension to smoothed-particle hydrodynamics
- Simulated optical light curves of super-Eddington tidal disruption events with ZEBRA flows
- Circumbinary discs from tidal disruption events
- The Lagrangian Numerical Relativity code SPHINCS_BSSN_v1.0
- Numerical Discreteness Errors in Multi-Species Cosmological N-body Simulations
- Deviation in stellar trajectory induced by asymmetry in partial tidal disruption
- Clumpy shocks as the driver of velocity dispersion in molecular clouds: the effects of self-gravity and magnetic fields
- SPRAY: A smoothed particle radiation hydrodynamics code for modeling high intensity laser-plasma interactions
- Partial tidal disruption of White Dwarfs in off-equatorial orbits around Kerr black holes
- Shock-capturing particle hydrodynamics with reproducing kernels