-
Notifications
You must be signed in to change notification settings - Fork 146
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Particles stuck in DOSXYZnrc following modification to ELECTR for magnetic fields #425
Comments
Yes, I can confirm the behaviour, at least with the air and bone interface example. |
Thanks Frederic. I am still having the same issue after downloading from https://github.com/nrc-cnrc/EGSnrc.git today. Where can I get the correct version from? Thanks. |
For now if you replace line
with:
this will fix the bug and the transport will be correct if you are not using magnetic fields. After that change, recompile any apps you are using. As @mchamberland points out this was a recently introduced bug while working on magnetic fields in vacuum; we'll push a proper fix to the release asap. |
Thanks @snaqvi69 and @mchamberland for reporting on this rather critical bug! Will advise shortly. |
Assign the current particle region, ir(np), to the old region index, irold, within the ustep loop in electron transport. Previously, irold was not updated, so the irnew ~= irold condition added to fix magnetic field transport in vacuum caused zero-size steps to skip the region change macro. Remove the now redundant irold = ir(np) assignment in the non-zero step size block.
Assign the current particle region, ir(np), to the old region index, irold, within the ustep loop in electron transport. Previously, irold was not updated, so the irnew ~= irold condition added to fix magnetic field transport in vacuum caused zero-size steps to skip the region change macro. Remove the now redundant irold = ir(np) assignment in the non-zero step size block.
Assign the current particle region, ir(np), to the old region index, irold, within the ustep loop in electron transport. Previously, irold was not updated, so the irnew ~= irold condition added to fix magnetic field transport in vacuum caused zero-size steps to skip the region change macro. Remove the now redundant irold = ir(np) assignment in the non-zero step size block.
I tried the latest version of EGSnrc. But every dosxyznrc simulation seems to be getting stuck after a few histories. Even the examples such as air_bone_interface_example.egsinp.
I am wondering if anyone has experienced this issue. Thanks.
The text was updated successfully, but these errors were encountered: