T9: General N-Body problem (free-fall Collapse of a sphere)

Before the tutorials:

Do, think about, and research the following:

During the tutorials:

Program it!

Example programs:

These are just examples.

Discussion of the results:

Plot your results with gnuplot and plot the behaviour of the systems. Can you explain what you see ?

Example plots:

Programming goals for T9:

Having many particles in our system and getting the program slow, we might think on a trivial parallelization ?Think about:

If your computer has multiple cores, you can parallelize independent loops by adding
#pragma omp parallel for
in front of it. To tell the compiler to compile with OpenMP, you have to add
-openmp
to the options in the Makefile. You can control how may cores should be used by the program by the setting the environment variable
export OMP_NUM_THREADS=4