Scalable n-body event prediction
- First Online:
- Cite this article as:
- Braeger, S., Arnold, N. & Dechev, D. centr.eur.j.comp.sci. (2012) 2: 1. doi:10.2478/s13537-012-0005-9
- 22 Downloads
The general simulation of n-body systems often requires the simulation of pairwise interaction events between the objects. The naive method of simulating these events is an algorithm that polls each pair of objects for an interaction every time step. This algorithm has O(n2)operations per time step in the number of objects. However, this method scales very well to multiple cores. In this paper, we propose a novel method of pairwise simulation that saves a significant amount of computation time by predicting possible future outcomes rather than reacting to them. We demonstrate the implementation of this method, as well as demonstrate that it has amortized O(n) complexity per time step. We also demonstrate an implementation to allow this algorithm to scale comparably well to multiple cores of a shared memory machine.