1 / 8

Barnes-Hut Algorithm CS498lvk

Barnes-Hut Algorithm CS498lvk. Abhinav S Bhatele Feb 14th, ‘06. Introduction. The algorithm was presented in "A Hierarchical O(n log n) force calculation algorithm" by J. Barnes and P. Hut in Nature, v. 324, December 1986

Download Presentation

Barnes-Hut Algorithm CS498lvk

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Barnes-Hut AlgorithmCS498lvk Abhinav S Bhatele Feb 14th, ‘06

  2. Introduction • The algorithm was presented in "A Hierarchical O(n log n) force calculation algorithm" by J. Barnes and P. Hut in Nature, v. 324, December 1986 • It is a solution to the N-body problem and is widely used in astrophysics • It has been thoroughly parallelized • However it is not accurate as some other methods like the Fast Multipole Method (FMM)

  3. Sequential Algorithm • t = 0 • while t < t_final • for i = 1 to n • compute f(i) = force on particle i • move particle i under force f(i) for time dt • end for • compute interesting properties of particles • t = t + dt • end while

  4. Forces on a particle • Three major forces: • External force • Nearest Neighbour forces • Far Field Forces – these are the ones difficult to parallelize • The third force calculation takes 0(n2) – which is reduced to 0(n log n) by use of divide and conquer algorithms • To reduce the no. of particles in the force calculation, we use quad-trees and oct-trees • Make use of adaptive quad-trees when distribution of particles bounded in the box is uneven

  5. Broad Overview • Main Steps: • Initialize the tree • In every iteration: • Compute the center of mass and total mass of each subtree • Compute the forces on each particle • Update the positions according to the forces • Migrate the particles

  6. Parallelization • The step which we should parallelize to see reasonable effects: • Calculating forces on particles • For the sake of simplicity we might not parallelize: • Computing centroids and masses • Updating the particles • Migrating them

  7. Any ideas/suggestions ??

More Related