Skip to content

Fix random cone test

Filip Husko requested to merge fix_random_cone_test into master

Fixes #870 (closed).

In a recent MR, the function random_direction_in_cone that generates a random unit vector within a given cone was modified. It no longer takes both the ID of a BH and a gas particle as inputs, but only the former. However, this means that the testRandomCone.h test was less random than we wanted, and was thus failing.

I have modified that test in a very simple way. It still does exactly the same thing, but we now generate a random id id_random and pass id_BH + id_random instead of id_BH to the random_direction_in_cone function. The test again passes with this change.

Edited by Matthieu Schaller

Merge request reports