Algorithm Search⌘K

N-body and particle methods

Problems

  • Gravitational N-body problem

    Given the masses, positions and velocities of N bodies that attract by gravity, compute their positions and velocities at later times.

    intro
  • Vlasov-Poisson system

    The kinetic equations of a collisionless plasma or star system, a phase-space density advected by the field that it creates through Poisson's equation.

    core

Algorithms

  • Direct N-body summation

    Computes the force on each of N particles by summing over all other particles, in O(N^2) time per step and with no approximation error.

    Θ(N^2) worst1 languagesintro
  • Barnes-Hut algorithm

    Builds an octree of the particles and treats each far cell as one pseudo-particle at its center of mass; a force step costs O(N log N) for non-pathological distributions.

    Θ(N^2) worst1 languagescore
  • Boris pusher

    Advances a charged particle in electric and magnetic fields by half an electric kick, a rotation about B and another half kick, preserving phase-space volume.

    Θ(N T) worst1 languagescore
  • Cloud-in-cell assignment

    Spreads each particle's charge or mass over the nearest grid points with linear weights, and uses the same weights to interpolate the field back, so no particle feels its own field.

    Θ(N + M) worst1 languagescore
  • Fast multipole method

    Evaluates all pairwise interactions of N particles to a set accuracy in O(N) time, with multipole and local expansions on a tree and translations between them.

    Θ(N^2) worst1 languagescore
  • Friends-of-friends algorithm

    Groups simulation particles into halos by linking every pair closer than a linking length and taking the connected components.

    Θ(N^2) worst1 languagescore
  • Particle-in-cell plasma simulation

    Moves charged macroparticles in fields computed on a grid from their deposited charge and current; the main method of kinetic plasma simulation.

    Θ(T (N + M)) worst1 languagescore
  • Particle-mesh method

    Assigns particle mass or charge to a grid, solves Poisson's equation on the grid by FFT and interpolates the forces back, in O(N + M log M) per step for M grid points.

    Θ(N + M log M) worst1 languagescore
  • Adaptive fast multipole method

    Refines the FMM tree only where particles are dense and uses four interaction lists (U, V, W and X), so the cost stays near linear in N for strongly nonuniform distributions.

    O(D N (p^2 / s + p + s)) worst1 languagesadvanced
  • Fast Gauss transform

    Evaluates sums of N Gaussians at M targets in O(N + M) time by Hermite and Taylor expansions on a grid of boxes.

    O((N + M) p^2 + b n^2 p^3) worst1 languagesadvanced
  • Fourth-order Hermite integrator

    Predicts positions from the force and its time derivative, then corrects with a Hermite interpolant; the standard integrator of direct N-body codes.

    Θ(N^2) step1 languagesadvanced
  • Material point method

    Carries mass, momentum and history on particles and solves the momentum equation on a background grid each step, for large deformations of solids.

    Θ(N + M) worst1 languagesadvanced
  • Particle-particle particle-mesh method

    Splits the force into a short-range part summed directly over near neighbors and a smooth long-range part computed on a mesh by FFT.

    Θ(N^2) worst1 languagesadvanced
  • TreePM method

    Splits gravity into a long-range part solved on a mesh by FFT and a short-range part summed with a Barnes-Hut tree; GADGET-2 and other cosmological codes use it.

    Θ(N^2) worst1 languagesadvanced
  • Vortex particle method

    Represents an incompressible flow by particles that carry vorticity and moves them with the velocity from the Biot-Savart law, often summed by a tree or FMM.

    Θ(N^2) worst1 languagesadvanced
  • Wisdom-Holman integrator

    A symplectic splitting for planetary systems that advances the Kepler motion of each planet exactly and adds the mutual perturbations as kicks.

    Θ(N^2) step1 languagesadvanced
  • Black-box fast multipole method

    An FMM for any smooth kernel that interpolates the kernel at Chebyshev nodes and compresses the multipole-to-local operators by singular value decomposition.

    Θ(N^2) worst1 languagesresearch
  • Generalized interpolation material point method

    Gives each material point a finite domain and averages the grid shape functions over it, which reduces the cell crossing noise of the original MPM.

    Θ(N + M) worst1 languagesresearch
  • Kernel-independent fast multipole method

    An FMM that replaces analytic expansions by equivalent densities on surfaces around each box, fitted by small solves, so it works for many kernels.

    Θ(N^2) worst1 languagesresearch
  • Particle strength exchange

    Approximates the Laplacian on scattered particles by an integral operator, so viscous diffusion in vortex methods becomes an exchange of strength between neighbors.

    Θ(N + P) worst1 languagesresearch

Data structures

  • Hashed oct-tree

    An octree whose cells sit in a hash table keyed by Morton codes, so a parallel tree code can find any cell and share cells across processors.

    O(N log N + N L) build1 languagesadvanced

Techniques

  • Gravitational softening

    Replaces the pair potential -G m / r by -G m / sqrt(r^2 + epsilon^2), so the force stays finite in close encounters; epsilon sets the smallest resolved scale.

    core
  • Block time steps

    Gives each particle a power-of-two fraction of a base step chosen from its own acceleration, so dense regions get small steps without slowing the rest.

    advanced
  • Kustaanheimo-Stiefel regularization

    Maps the Kepler problem to a harmonic oscillator in four dimensions with a new time variable, so close binaries can be integrated without singularity.

    advanced
  • Multipole-to-local translation

    Converts the multipole expansion of a far cell into a local Taylor expansion about a target cell; it is the costliest step of the fast multipole method.

    advanced

Concepts

  • Multipole expansion

    Writes the far-field potential of a cluster of sources as a series in inverse powers of distance, whose first terms are the monopole, dipole and quadrupole.

    core

Definitions

  • Multipole acceptance criterion

    The rule that lets a tree code use a cell's expansion instead of opening it, such as s/d < theta for cell size s, distance d and opening angle theta.

    core

Theorems

  • Multipole truncation error bound

    For charges of total absolute size A within radius r, the p-term multipole error at distance R > r is at most A/(R - r) (r/R)^(p+1) in 3D (1/r) and A/((p+1)(1 - r/R)) (r/R)^(p+1) in 2D (log).

    core