Fast Multipole Algorithm

16
Fast Multipole Method For Solving N-Body Problems Amir Masoud Abdol University of Amsterda

description

 

Transcript of Fast Multipole Algorithm

Page 1: Fast Multipole Algorithm

Fast Multipole MethodFor Solving N-Body Problems

Amir Masoud AbdolUniversity of Amsterdam

Page 2: Fast Multipole Algorithm

N-Body Problem

▪ The n-body problem is the problem of predicting the motion of a group of particles that interacts with each other gravitationally or by other forces.

▪ First introduced by Newton to understand the motion of Sun, planets and other visible stars.

▪ Electrostatics

▪ Magneto statics

▪ Acoustic Scattering

▪ Even Diffusion

▪ They are computationally intensive. O(n2)

▪ They can be huge because of large number of particles.

Page 3: Fast Multipole Algorithm

N-Body Problem

▪ Problem definition

▪ mi is the mass, and Φ is potential function

▪ and we are interested in equilibrium configuration of a set of particles.

▪ Consider potentials of the form

▪ Φ = Φ near+ Φ external+ Φ far

▪ Φ near is not a problem. O(n)

▪ Φexternal is independent of the number of particles. O(n)

▪ Φ far is a BIG problem. O(n2)

Page 4: Fast Multipole Algorithm

Different Solutions

▪ Solutions:

▪ Simple Numerical Integration: Euler Method, O(n2)

▪ Truncation Based Methods*

▪ Barnes-Hut Method, and Appel▪ Consider a pseudo-particle for a group of particles in distant.

▪ Then, perform integration or solving method.

▪ O(n log(n))

▪ Fast Multipole Method (Multipole Expansion + Local Expansion)▪ O(n)

Page 5: Fast Multipole Algorithm

Fast Multipole MethodIdea

▪ Recursively divide the computational domain.

▪ The algorithm group particles together and compute the centralized potential. (Multipole Expansion)

▪ Distribute information to upper level in grid decomposition.

▪ Use local information (interaction list) in coarser mesh level to transfer information from long-range to near-range. (Local Expansion)

▪ Redistribute coarser mesh level to finer mesh level and again use local information of finer mesh to localize the information even more. Up to finest mesh level!

▪ Compute long-range potential using local expansion

▪ Combine long-range and near-range potential and build the potential function.

Page 6: Fast Multipole Algorithm

Fast Multipole Method Multipole Expansion

▪ Suppose that m charges of strengths qi are located at points zi with |zi|< r. Then for any z C with |z|>r, the potential ∈ Φ(z) is given by

There are another Lemmas that allows us to shift this function. For instance shifting the center of circle into origin.

[1]

Page 7: Fast Multipole Algorithm

Fast Multipole Method Local Expansion

▪ Local expansion about the center of box i at level l, describing the potential field due to all particles outside i’s parent box and the parent box’s nearest neighbors.

▪ Interaction list:For box i at level l, it’s the set of boxes which are children of the nearest neighbors of I’s parent and which are well separated from box i. (Red Boxes)

Page 8: Fast Multipole Algorithm

Algorithm Computing Multipole Expansion

1. Form multipole expansion of potential field due to particles in each box about the box center at the finest mesh level.

Page 9: Fast Multipole Algorithm

AlgorithmComputing Multipole Expansion

2. Form Multipole expansions about the centers of all boxes at all coarser mesh levels, each expansion representing the potential field due to all particles contained in one box.

(Continuing this procedure to coarser mesh level)

Page 10: Fast Multipole Algorithm

AlgorithmComputing Local Expansion

3. Form a local expansion about the center of each box at each mesh level l<=n-1.

This local expansion describes the field due to all particles in the system that are not contained in the current box or its nearest neighbors.

Page 11: Fast Multipole Algorithm

AlgorithmComputing Local Expansion

4. Shifting the local expansion for a given box to the center of the box’s children, forming the initial expansion for the boxes at the next level.

Page 12: Fast Multipole Algorithm

AlgorithmComputing Local Expansion

5. Continue 3 and 4 to shift local expansion to finest mesh level.

Now we have the local expansion in finest mesh level. And we can compute the local expansion at particle position by Φ(z) for z inside each box.

Page 13: Fast Multipole Algorithm

AlgorithmEvaluate Local Expansion

6. Evaluate Local Expansions at particle positions.

• For every particle pj located at the point zj in box, evaluate the Φbox(zj)

Page 14: Fast Multipole Algorithm

AlgorithmComputing the Φ near

6. For every particle pj in box, compute interactions with all other particles within the box and its nearest neighbors as Φ near .

Now adding up Φ near and Φ far , we can have all forces in one equation. Putting this function into Newton formulation will form complete n-body model.

Page 15: Fast Multipole Algorithm

Conclusion

1. The complexity is O(n)

2. The error estimation is easy because it based on polynomial expansion (Multipole and Taylor Expansion). Actually, error bound is available.

3. There is no need for numerical differentiation because Φ are polynomials.

4. It also support boundary conditions.

Page 16: Fast Multipole Algorithm

References

1. Greengard, L. and Rokhlin, V. (1987). A fast algorithm for particle simulations. Journal of Computational Physics, 73(2):325–348.