- Introduced by
- Leslie Greengard and Vladimir Rokhlin
- Year
- 1987
- Type
- Computational acceleration technique
- Family
- Hierarchical Acceleration
What does it do?
The Fast Multipole Method (FMM) is a hierarchical algorithm, introduced by Greengard and Rokhlin in 1987, for evaluating interactions among large numbers of particles.
It reduces the cost of summing all pairwise interactions from O(n²) to O(n log n) or O(n); the original 1987 formulation required work proportional to N for Coulombic and gravitational systems. It is used for N-body problems, boundary integral equations and Coulomb interactions.
The intuition behind the method
Evaluating every pairwise interaction directly costs O(n²) operations. FMM exploits the fact that the field of a cluster of distant particles can be represented compactly by a few multipole moments (a multipole expansion), so one expansion can replace many individual interactions. The domain is recursively subdivided into a tree of cells. Interactions between well-separated cells are handled through expansions, while nearby particles are computed directly. Because each distant cluster is summarised once rather than particle by particle, the total work grows close to linearly with the number of particles.
History
Greengard and Rokhlin introduced the method in 1987 for the rapid evaluation of potential and force fields in systems of Coulombic or gravitational particles, reducing the work from O(N²) to work proportional to N. The original paper named plasma physics, fluid dynamics, molecular dynamics and celestial mechanics as target areas. Ying, Biros and Zorin (2004) later developed a kernel-independent adaptive variant that does not depend on kernel-specific translation operators.
When to use it
Choose FMM when the number of particles is large and the interaction kernel admits a multipole expansion, as with Coulombic and gravitational potentials, or when boundary integral equations on complex geometries must be solved repeatedly. For small systems, direct summation is the simplest option. For short-range interactions that can be truncated at a cutoff, a cutoff scheme avoids the far-field expansion altogether. Tree codes such as Barnes-Hut are a simpler alternative whose error is governed by an opening-angle criterion rather than by an expansion order that can be systematically increased; FMM is preferred when a controlled, convergent expansion error and near-linear scaling matter. Standard FMM requires translation operators derived for the specific kernel; when no such expansion is available, kernel-independent variants (Ying et al., 2004) are the relevant option. Periodic systems need an additional treatment, as noted under pitfalls.
Limitations and considerations
- Implementation is complex: translation operators between multipole and local expansions, special-function evaluation and tree bookkeeping must all be handled correctly.
- Storing the tree, the expansions and the interaction lists adds memory overhead that raises the constant factor of the method.
- Translation operators are derived for each kernel; kernel-independent variants remove this restriction but are a different implementation with their own trade-offs.
- Efficiency drops for strongly non-uniform particle distributions; dense clusters need adaptive refinement, which adds overhead.
- Parallel load balance is difficult. Deep tree levels contain many small cells, so work per cell is uneven, and the upward pass requires moments to be aggregated across processors, which adds communication. Shallow levels contain few cells and limit the available parallelism. Balanced partitioning is therefore needed.
- The truncation error bounds individual far-field expansions only. It does not guarantee the accuracy of the full calculation, which also depends on the separation parameter and on roundoff, so the final result should be checked against direct summation on a subset of particles.
- Very high truncation orders increase the influence of roundoff error. The 2D logarithmic kernel requires its own expansion and translation formulas that differ from the 3D case, so convergence checks should be repeated for each dimension.
Source conditions do not replace independent scientific review or validation by an analysis engine.
Strengths
- Reduces the cost of summing all pairwise interactions from O(n²) to O(n log n) or O(n), with the original formulation requiring work proportional to N for Coulombic and gravitational systems.
- Accuracy is governed by the multipole truncation order p: increasing p reduces the far-field truncation error, so the accuracy can be tuned rather than fixed in advance.
- Grounded in the multipole expansion of classical potentials. For a well-separated cluster, the truncation error decreases as the order p increases, so the far-field approximation can be estimated and checked against direct summation.
Applications
- Molecular dynamics: evaluating long-range electrostatic interactions among large numbers of atoms.
- Astrophysics and celestial mechanics: N-body simulation of gravitating systems.
- Plasma physics: evaluating Coulomb interactions among large numbers of charged particles.
- Boundary element methods: accelerating the matrix-vector products that arise in boundary integral equations for acoustic and electromagnetic scattering on complex geometries.
- Fluid dynamics: evaluating interactions in large particle-based fluid computations.
How it works
How it works
Build a spatial tree that recursively partitions the particles into cells: an octree in 3D and a quadtree in 2D. Compute the multipole moments (for example charge and dipole) of the particles in each cell, starting from the finest level.
Upward pass: combine the multipole moments of child cells into those of their parent cells, working from the finest level towards the coarsest. Downward pass: convert the multipole expansions of well-separated cells into local Taylor expansions about the target cells.
Near-field evaluation: for each target particle, compute direct interactions with particles in nearby cells. Add the far-field contribution evaluated from the local expansion accumulated for its cell.
Check accuracy by comparing FMM results with direct O(n²) summation on a subset of particles. Increase the truncation order p and confirm that the results change by less than the desired tolerance; if they do not, p is not yet sufficient.
Common pitfalls
- Choosing a truncation order p that is too small leaves far-field error above the required tolerance; check convergence by increasing p rather than assuming the chosen value is adequate.
- The near/far separation parameter θ must be set with both accuracy and near-field cost in mind. Under the definition used here (far field when distance exceeds θ times cell size), a larger θ admits fewer far-field pairs and shifts work to direct computation; confirm that the convention matches the implementation being used.
- Applying FMM to long-range potentials in periodic systems without a periodicity correction, such as Ewald summation or another special treatment, leaves the long-range contributions incorrect.
- Using a static tree on clustered particle distributions produces unbalanced cells and poor performance; adaptive refinement is needed for non-uniform data.
Frequently asked questions
What is a multipole expansion and why does truncation give a controlled error?
A multipole expansion represents the potential of a charge distribution, seen from a distance, as a series in powers of 1/r weighted by the moments of the distribution. Truncating the series at order p leaves an error that decreases as p increases, and the size of the error depends on how far the target lies from the cluster relative to the cluster's extent. Because the error decreases geometrically in p rather than linearly, adding terms improves accuracy quickly.
How do I choose the multipole truncation order p?
The required p depends on the tolerance and on the separation ratio θ, so no single rule fixes it in advance. Increase p and compare results: run the calculation with p and with p+2, and if the results agree to the required tolerance, p is adequate. Testing against direct summation on a subset of particles provides an independent check.
What is the near-field/far-field distinction and how do I set the threshold?
Far field: particles separated by more than θ times the cell size, approximated with a multipole or local expansion. Near field: separation at most θ times the cell size, computed directly. Under this definition, a larger θ admits fewer far-field pairs, so more interactions are computed directly; this costs more but reduces approximation error. Conventions for θ differ between implementations, so the value that gives the required accuracy should be determined by testing against direct summation on a subset of particles.
Why is FMM hard to parallelise compared to direct O(n²) computation?
The main difficulty is load imbalance across the tree: deep levels contain many small cells, which offers parallelism but is limited by memory, while shallow levels contain few cells. The upward pass requires aggregation of moments across processors, which can become a communication bottleneck. Practical parallel implementations therefore need partitioning strategies that keep both work and communication balanced.
Related methods
Sources
Greengard, L., & Rokhlin, V. (1987). A fast algorithm for particle simulations. Journal of Computational Physics, 73(2), 325–348.
Open DOI referenceGreengard, L. (1988). The Rapid Evaluation of Potential Fields in Particle Systems. MIT Press.
ISBN: 0262071088Ying, L., Biros, G., & Zorin, D. (2004). A kernel-independent adaptive fast multipole method. Journal of Computational Physics, 196(2), 591–626.
Open publication reference