Taya Govreen-Segal raised the following issue - it looks like there's a typo in compton.c where there is some code to reverse velocities:
if (random_number (0.0, 1.0) < 0.5 * (1. + fabs (v / VLIGHT)))
{
/* Then we want the photon to be headed towards the photon */
if (v > 0)
{
velocity_electron[0] = (-velocity_electron[0]);
velocity_electron[2] = (-velocity_electron[1]);
velocity_electron[2] = (-velocity_electron[2]);
}
}
else if (v < 0)
{
velocity_electron[0] = (-velocity_electron[0]);
velocity_electron[2] = (-velocity_electron[1]);
velocity_electron[2] = (-velocity_electron[2]);
}
where the second line of each block assigns velocity_electron[2] twice and doesn't change velocity_electron[1]. I'm a bit confused how this hasn't been picked up in tests, it seems important.
Taya Govreen-Segal raised the following issue - it looks like there's a typo in compton.c where there is some code to reverse velocities:
where the second line of each block assigns velocity_electron[2] twice and doesn't change velocity_electron[1]. I'm a bit confused how this hasn't been picked up in tests, it seems important.