Newer
Older
This code simulates particles under self-gravity. The forces are calculated via direct summation or with a tree and multipole expansion.
In the branch "adaptive-timestepping" there is also an implementation that uses adaptive timestepping.
Most of the code is written in C++, Python is used to make plots and animations. OpenMP is used for parallelisation.
## Install OpenMP
https://www.geeksforgeeks.org/openmp-introduction-with-installation-guide/
This will create a folder called nbody that contains everything.
git clone https://gitlab.uzh.ch/armindamon.riess/nbody.git
This requires cmake and make. Run it in the folder nbody.
## Compiling and running the program
Go to the nbody/build directory and run these commands: