The project was done for a course in concurrent programming at KTH.
The project evaluates two different methods of approximating an N-Body system.
-
Brute force
This is the naive and initial approach to solving a problem like this. It is very inefficient but pretty easy to parallelize.
-
Barnes-Hut
This is a well-known approximation method that works by dividing the bodies into sections that are either near or far away. If a cluster of bodies is far away, their effect on a specific body can be approximated as if the cluster was a single body positioned at the center of gravity.
The project also included parallelizations of the above-mentioned methods with comparisons of their efficiency. More information and the conclusions can be found in the project report.
To run a simple test make the first program and wait for it to finish calculating. After it is done, a visualization window will pop up.
make 1
OpenGL and a C compiler are required for this project to run. Please make sure that you have the necessary tools.
Erik Båvenstrand – Portfolio – erik@bavenstrand.se
Distributed under the MIT license. See LICENSE
for more information.