A Cost Optimal Parallel Algorithm for Computing Force Field in N-Body Simulations
We consider the following force field computation problem: given a cluster of n particles in 3-dimensional space, compute the force exerted on each particle by the other particles. Depending on different applications, the pairwise interaction could be either gravitational or Lennard-Jones. In both cases, the force between two particles vanishes as the distance between them approaches to infinity. Since there are n(n−1)/2 pairs, direct method requires Θ(n 2) time for force-evaluation, which is very expensive for astronomical simulations. In 1985 and 1986, two famous Θ(n log n) time hierarchical tree algorithms were published by Appel  and by Barnes and Hut  respectively. In a recent paper, we presented a linear time algorithm which builds the oct tree bottom-up and showed that Appel’s algorithm can be implemented in Θ(n) sequential time. In this paper, we present an algorithm which computes the force field in Θ(log n) time using an n log n processor CREWPR AM. A key to this optimal parallel algorithm is replacing a recursive top-down force calculation procedure of Appel by an equivalent non-recursive bottom-up procedure. Our parallel algorithm also yields a new Θ(n) time sequential algorithm for force field computation.
KeywordsParalle algorithms spatial tree data structures force field evaluation N-body simulations PRAM cost optimal algorithms
Unable to display preview. Download preview PDF.
- 2.R.J. Anderson, Tree data structures for N-body simulation, 37th Annual Symposium of Foundations of Computer Science, IEEE(1996):224–233.Google Scholar
- 7.A. Grama, V. Kumar and A. Sameh, Scalable parallel formulations of the Barnes-Hut method for n-body simulations, In Supercomputing’94 Proceedings, 1994.Google Scholar
- 9.L. Greengard, The rapid evaluation of potential fields in particle systems, The MIT Press, 1988.Google Scholar
- 11.V. Kumar, A. Grama, A. Gupta and G. Karypis, Introduction to Parallel Computing: Design and Analysis of Algorithms, The Benjamin/Cummings Publishing Company, Inc. 1994.Google Scholar
- 12.J. Singh, C. Holt, T. Totsuka, A. Gupta, and J. Hennessy, Load balancing and data locality in hierarchical n-body methods, Journal of Parallel and Distributed Computing, 1994.Google Scholar
- 13.M. Warren and J. Salmon, Astrophysical n-body simulations using hierarchical tree data structures, In Supercomputing’92 Proceedings, 1992.Google Scholar
- 14.M. Warren and J. Salmon, A parallel hashed oct tree n-body algorithm, In Supercomputing’ 93 Proceedings, 1993.Google Scholar