Calculation of the gravitational force
The gravitational force has a great impact on the speed of convergence of the algorithm. It is calculated using Eq. (10).