implemented gravitational_force for vectorized particles