Anne Reinarz Durham University

Fast Multipole

Fast Multipole

L. Greengard, V. Rokhlin: A fast algorithm for particle simulations. J. Comp. Phys., 73, 1987.

C. R. Anderson: An implementation of the Fast Multipole Method without multipoles.. SIAM J. Sci. Stat. Comput. 13(4), 1992.


Complexity of Fast Multipole

Lets do a computation with $N = 10^6$ particles assuming that $N$ computations take 1 hour


Fast Multipole Method:


Fast Multipole Method

Image from the Master thesis of Fabio Gratl


Required kernels

P2M: Particle to Multipole


Constructing Multipoles (M2M/P2M)

2 Approaches:

Original Approach of Greengard/Rohlkin, 1987


Constructing Multipoles (M2M/P2M)

2 Approaches:

Or: inner/outer ring approximations by Anderson, 1992


Anderson’s method

Fundamental idea: represent potential via a surface integral

\[\Psi_a (\vec{x}) = \int\limits_{S^2} g( a \vec{s} ) \left( \sum\limits_{n=0}^\infty \left( \frac{a}{r} \right)^{n+1} Q_n(\vec{s} \cdot \vec{x}_p ) \right) ds\]

Anderson’s method

\[\Psi_a (\vec{x}) \approx \sum\limits_{i=1}^K w_i \, g( a \vec{s}_i ) \left( \sum_n ( \frac{a}{r} )^{n+1} Q_n(\vec{s}_i \cdot \vec{x}_p ) \right)\]

Anderson’s method

\[\Psi_a (\vec{x}) \approx \sum w_i \, g( a \vec{s}_i ) \left( \sum\limits_n \left( \frac{a}{r} \right)^{n+1} Q_n(\vec{s}_i \cdot \vec{x}_p ) \right)\]
</img>
only $g( a \vec{s}_i )$ need to be computed and stored for each box

Required kernels

P2M: Particle to multipole


Required kernels

M2M: Multipole to Multipole

</img>
- approximate potential caused by all child boxes of the current box - evaluate and accumulate outer ring approximations of all child boxes at positions $a \vec{s}_i $ (of the parent box) to obtain values $g( a \vec{s}_i )$

Upward Pass

### Subdivide domain into quadtree/octree - start in root node - descent into subdomains and subdivide for $L$ levels (can have multiple particles per cell at lowest level) Add levels - Next: 1. P2M: particle to multipole 2. M2M: multipole to multipole

Required kernels

M2L: Multipole to Local


Required kernels

M2L: Multipole to Local


“Horizontal” Pass

</img>


“Horizontal” Pass

Compute forces – far-field (M2L)

Compute forces – near-field (P2P)


Required kernels: Downward Pass


Required kernels: Downward Pass

</img>


Fast Multipole Method – Summary

R. Yokota:

https://www.bu.edu/pasi/courses/12-steps-to-having-a-fast-multipole-method-on-gpus/

</img>


Fast Multipole Method – Summary

  1. Initialization: Choose a number of levels such that there are approx. $s$ particles per cell at the finest level. $\to$ $N/s$ cells

  2. Upward Pass: Beginning at the finest level create multipole expansions (P2M). Expansions cells at higher levels formed by the merging (M2M).

  3. Downward Pass: Compute the far-field (M2L) and near-field (P2P). Convert the multipole expansion into a local expansion about the centers of all cells (L2L/L2P).


Fast Multipole Method – Summary

Accuracy:


Fast Multipole Method – Summary

Complexity:


Comparison of Barnes-Hut and FMM

Approximate potential of sets/clusters of particles

  1. Barnes-Hut
    • pseudo particles in tree cells
    • $\theta$-criterion to determine far-field
  2. Fast Multipole
    • higher-order representations necessary!
    • no $\theta$-criterion to tune accuracy (instead choose number of terms in expansion)

Comparison of Barnes-Hut and FMM

Hierarchical computation of box potentials

  1. Barnes-Hut
    • combine pseudo particles in child cells
  2. Fast Multipole
    • generate high order box potentials
    • (accumulate approximate potentials of child boxes to approximate potential of parent box $\to$ needs to be derived for high-order representation)