CEMeNT-PSAAP / MCDC

MC/DC: Monte Carlo Dynamic Code
https://mcdc.readthedocs.io/en/latest/
BSD 3-Clause "New" or "Revised" License
23 stars 24 forks source link

Bug fix: particles sourced on cell boundaries #213

Closed spasmann closed 3 months ago

spasmann commented 3 months ago

In the updated CSG functions a particle is lost error occurred if a particle was sourced exactly on a cell boundary. In standard Monte Carlo, this bug may never surface but samples in iQMC hit these boundaries quite often.

In short, replacing = with <= in region_check() returns the same cell ID as was calculated before the updates.

jpmorgan98 commented 3 months ago

Thanks @spasmann you rock!!!!!!!!