SlideShare a Scribd company logo
1 of 16
Fast Multipole Method
For Solving N-Body Problems


                                  Amir Masoud Abdol
                              University of Amsterdam
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.
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)
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)
Fast Multipole Method
     Idea
▪ 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.
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]
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)
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.
Algorithm
Computing 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)
Algorithm
Computing 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.
Algorithm
Computing 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.
Algorithm
Computing 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.
Algorithm
Evaluate Local Expansion

6. Evaluate Local Expansions at particle
positions.
•   For every particle pj located at the
    point zj in box, evaluate the Φbox(zj)
Algorithm
Computing 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.
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.
References
1.   Greengard, L. and Rokhlin, V. (1987). A fast algorithm for particle simulations. Journal
     of Computational Physics, 73(2):325–348.

More Related Content

What's hot

NIPS2007: deep belief nets
NIPS2007: deep belief netsNIPS2007: deep belief nets
NIPS2007: deep belief nets
zukun
 
Learning object 1
Learning object 1Learning object 1
Learning object 1
Ina Na
 

What's hot (16)

Mit2 092 f09_lec19
Mit2 092 f09_lec19Mit2 092 f09_lec19
Mit2 092 f09_lec19
 
How to Solve the Force Problems
How to Solve the  Force ProblemsHow to Solve the  Force Problems
How to Solve the Force Problems
 
Physics Assignment Help
Physics Assignment HelpPhysics Assignment Help
Physics Assignment Help
 
Simulation of Scale-Free Networks
Simulation of Scale-Free NetworksSimulation of Scale-Free Networks
Simulation of Scale-Free Networks
 
Semi orthogonal low-rank matrix factorization for deep neural networks
Semi orthogonal low-rank matrix factorization for deep neural networksSemi orthogonal low-rank matrix factorization for deep neural networks
Semi orthogonal low-rank matrix factorization for deep neural networks
 
Discrete fourier transform
Discrete fourier transformDiscrete fourier transform
Discrete fourier transform
 
NIPS2007: deep belief nets
NIPS2007: deep belief netsNIPS2007: deep belief nets
NIPS2007: deep belief nets
 
Scale free network Visualiuzation
Scale free network VisualiuzationScale free network Visualiuzation
Scale free network Visualiuzation
 
metaheuristic tabu pso
metaheuristic tabu psometaheuristic tabu pso
metaheuristic tabu pso
 
Sns pre sem
Sns pre semSns pre sem
Sns pre sem
 
Computational methods and vibrational properties applied to materials modeling
Computational methods and vibrational properties applied to materials modelingComputational methods and vibrational properties applied to materials modeling
Computational methods and vibrational properties applied to materials modeling
 
con-dif2
con-dif2con-dif2
con-dif2
 
Ensemble Data Assimilation on a Non-Conservative Adaptive Mesh
Ensemble Data Assimilation on a Non-Conservative Adaptive MeshEnsemble Data Assimilation on a Non-Conservative Adaptive Mesh
Ensemble Data Assimilation on a Non-Conservative Adaptive Mesh
 
Differentiation and applications
Differentiation and applicationsDifferentiation and applications
Differentiation and applications
 
The newton raphson method
The newton raphson methodThe newton raphson method
The newton raphson method
 
Learning object 1
Learning object 1Learning object 1
Learning object 1
 

Similar to Fast Multipole Algorithm

Black hole entropy leads to the non-local grid dimensions theory
Black hole entropy leads to the non-local grid dimensions theory Black hole entropy leads to the non-local grid dimensions theory
Black hole entropy leads to the non-local grid dimensions theory
Eran Sinbar
 
636902main kwiat presentation
636902main kwiat presentation636902main kwiat presentation
636902main kwiat presentation
Clifford Stone
 
Competitive Learning [Deep Learning And Nueral Networks].pptx
Competitive Learning [Deep Learning And Nueral Networks].pptxCompetitive Learning [Deep Learning And Nueral Networks].pptx
Competitive Learning [Deep Learning And Nueral Networks].pptx
raghavaram5555
 
International Journal of Engineering Research and Development (IJERD)
International Journal of Engineering Research and Development (IJERD)International Journal of Engineering Research and Development (IJERD)
International Journal of Engineering Research and Development (IJERD)
IJERD Editor
 

Similar to Fast Multipole Algorithm (20)

ANN - UNIT 5.pptx
ANN - UNIT 5.pptxANN - UNIT 5.pptx
ANN - UNIT 5.pptx
 
Circuitanlys2
Circuitanlys2Circuitanlys2
Circuitanlys2
 
Nelder Mead Search Algorithm
Nelder Mead Search AlgorithmNelder Mead Search Algorithm
Nelder Mead Search Algorithm
 
Zoooooohaib
ZoooooohaibZoooooohaib
Zoooooohaib
 
📊 Conquer Your Stats Homework with These Top 10 Tips! 🚀
📊 Conquer Your Stats Homework with These Top 10 Tips! 🚀📊 Conquer Your Stats Homework with These Top 10 Tips! 🚀
📊 Conquer Your Stats Homework with These Top 10 Tips! 🚀
 
Greedy Algorithms with examples' b-18298
Greedy Algorithms with examples'  b-18298Greedy Algorithms with examples'  b-18298
Greedy Algorithms with examples' b-18298
 
Self Organizing Maps: Fundamentals
Self Organizing Maps: FundamentalsSelf Organizing Maps: Fundamentals
Self Organizing Maps: Fundamentals
 
Black hole entropy leads to the non-local grid dimensions theory
Black hole entropy leads to the non-local grid dimensions theory Black hole entropy leads to the non-local grid dimensions theory
Black hole entropy leads to the non-local grid dimensions theory
 
clustering tendency
clustering tendencyclustering tendency
clustering tendency
 
Neural networks Self Organizing Map by Engr. Edgar Carrillo II
Neural networks Self Organizing Map by Engr. Edgar Carrillo IINeural networks Self Organizing Map by Engr. Edgar Carrillo II
Neural networks Self Organizing Map by Engr. Edgar Carrillo II
 
Perceptron
PerceptronPerceptron
Perceptron
 
636902main kwiat presentation
636902main kwiat presentation636902main kwiat presentation
636902main kwiat presentation
 
KimJessie-NewtonRaphsonSlides.pptx
KimJessie-NewtonRaphsonSlides.pptxKimJessie-NewtonRaphsonSlides.pptx
KimJessie-NewtonRaphsonSlides.pptx
 
Competitive Learning [Deep Learning And Nueral Networks].pptx
Competitive Learning [Deep Learning And Nueral Networks].pptxCompetitive Learning [Deep Learning And Nueral Networks].pptx
Competitive Learning [Deep Learning And Nueral Networks].pptx
 
International Journal of Engineering Research and Development (IJERD)
International Journal of Engineering Research and Development (IJERD)International Journal of Engineering Research and Development (IJERD)
International Journal of Engineering Research and Development (IJERD)
 
NS-CUK Joint Journal Club: S.T.Nguyen, Review on "Neural Sheaf Diffusion: A ...
 NS-CUK Joint Journal Club: S.T.Nguyen, Review on "Neural Sheaf Diffusion: A ... NS-CUK Joint Journal Club: S.T.Nguyen, Review on "Neural Sheaf Diffusion: A ...
NS-CUK Joint Journal Club: S.T.Nguyen, Review on "Neural Sheaf Diffusion: A ...
 
NS-CUK Joint Journal Club: S.T.Nguyen, Review on "Neural Sheaf Diffusion: A T...
NS-CUK Joint Journal Club: S.T.Nguyen, Review on "Neural Sheaf Diffusion: A T...NS-CUK Joint Journal Club: S.T.Nguyen, Review on "Neural Sheaf Diffusion: A T...
NS-CUK Joint Journal Club: S.T.Nguyen, Review on "Neural Sheaf Diffusion: A T...
 
Bachelor's Thesis
Bachelor's ThesisBachelor's Thesis
Bachelor's Thesis
 
R. Sheth - The Phenomenology of Large Scale Structure
R. Sheth - The Phenomenology of Large Scale StructureR. Sheth - The Phenomenology of Large Scale Structure
R. Sheth - The Phenomenology of Large Scale Structure
 
The distribution and_annihilation_of_dark_matter_around_black_holes
The distribution and_annihilation_of_dark_matter_around_black_holesThe distribution and_annihilation_of_dark_matter_around_black_holes
The distribution and_annihilation_of_dark_matter_around_black_holes
 

Recently uploaded

Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functions
KarakKing
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
ZurliaSoop
 
Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please Practise
AnaAcapella
 

Recently uploaded (20)

ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docx
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and Modifications
 
Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - English
 
Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functions
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibit
 
Spatium Project Simulation student brief
Spatium Project Simulation student briefSpatium Project Simulation student brief
Spatium Project Simulation student brief
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.
 
Unit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxUnit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptx
 
SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentation
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17
 
Google Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxGoogle Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptx
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdf
 
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxHMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
Dyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.pptxDyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.pptx
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)
 
Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please Practise
 

Fast Multipole Algorithm

  • 1. Fast Multipole Method For Solving N-Body Problems Amir Masoud Abdol University of Amsterdam
  • 2. 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.
  • 3. 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)
  • 4. 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)
  • 5. Fast Multipole Method Idea ▪ 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.
  • 6. 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]
  • 7. 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)
  • 8. 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.
  • 9. Algorithm Computing 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)
  • 10. Algorithm Computing 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.
  • 11. Algorithm Computing 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.
  • 12. Algorithm Computing 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.
  • 13. Algorithm Evaluate Local Expansion 6. Evaluate Local Expansions at particle positions. • For every particle pj located at the point zj in box, evaluate the Φbox(zj)
  • 14. Algorithm Computing 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.
  • 15. 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.
  • 16. References 1. Greengard, L. and Rokhlin, V. (1987). A fast algorithm for particle simulations. Journal of Computational Physics, 73(2):325–348.

Editor's Notes

  1. Many problems in computational physics require the evaluation of all pairwise interactions in large ensembles of particles.
  2. Newton model the system in term of differential equations. But we all know that if the problem size is big this method won’t work.Large pseudo-particle in the center of mass.Each of these methods are tried in different ways. Implementing in large clusters of computers and …I’m not going into the detail for solving the problem. But the main problem is that we don’t want to spend too much time on computing inteaction of distant particles on specific particle.Why truncation based method are not good because in unbalanced system long-range forces can dominant biomolecular system arrangement. (We should consider that in molecular system the long-range is not really long!)It called fast because the cost of computing the result of the linear operation grows more slowly with problem size than it would if a navie representation were used.
  3. Fnear is not a problem because number of local particles are less than all particles in the system.
  4. Fnear is not a problem because number of local particles are less than all particles in the system.
  5. They introduce this formulation to describe the potential of groups of particles on one particle in term of polynomial.Consider we have a formulation for summarizing the potential of group of particles.Now we can use this formula + local expansion information to distributed the information to the whole system.
  6. They introduce this formulation to describe the potential of groups of particles on one particle in term of polynomial
  7. They introduce this formulation to describe the potential of groups of particles on one particle in term of polynomial
  8. They introduce this formulation to describe the potential of groups of particles on one particle in term of polynomial
  9. After this step we gather all information in one box.
  10. In this process we actually shift all the information of the system from long-range to near-range and use that information in form of polynomial to find the long-range potential with ease.
  11. In this process we actually shift all the information of the system from long-range to near-range and use that information in form of polynomial to find the long-range potential with ease.
  12. In this process we actually shift all the information of the system from long-range to near-range and use that information in form of polynomial to find the long-range potential with ease.