Page 1 of 1

Impossible to set ignored_portion less than 1e-5 in touschek_scatter function

Posted: 03 Jan 2023, 02:33
by Skamarokha
Found out that if one will set ignored_portion in touschek_scatter less than 1e-5 (1e-6, for example), all simulated particles will be put to tracking, as if ignored_portion were 0.

UPD: elegant 2022.2.0, Nov 15 2022 on Windows was tested.

Re: Impossible to set ignored_portion less than 1e-5 in touschek_scatter function

Posted: 06 Feb 2023, 13:48
by michael_borland
Mikhail,

I see in the code that values less than or equal to 1e-6 are treated as zero. I think the assumption was that for ~1 million particles, the algorithm that ignores particles probably doesn't give very precise results when ignored_portion is so small. However, it shouldn't hurt anything, so I've reduced the cut-over value to 1e-9.

Thanks for reporting the issue.

--Michael