develop: Fringe Fields Discussion
A mismatch between BDSIM and the tracking code Manzoni (validated by MAD-X) has been observed since some commits relative to the fringe fields while before, BDSIM, Manzoni and experimental values matched.
A discussion has been opened. Some slides describing the situation are attached to this Issue.
Comments (7)
-
reporter -
I’ve tested the correction proposed above by Eliott and I can confirm that initializing the boolean
zeroStrength
to false in BDSIntegratorDipoleFringe.cc line 80 fixes the bug. See below a comparison between the default version of develop and the “corrected” one, recompiled withzeroStrength
set to false in the “else” condition. Data in CYAN are from MANZONI.
-
Hello,
Thanks for the report and fix! Indeed, from analysis of the code,
zeroStrength
is never initialised but can in the case of a zero strength dipole or fringe be set to True. Therefore, the default behaviour will be that the value is just whatever that bit of memory was before and the fringe field will be effectively turned on or off.Can you commit this change in a branch please (e.g. issue297-dipole-fringe) and push. @William Shields could you check the fix please against one of our models?
We likely see different behaviour due to different compilers / platforms, but ultimately with the fix should see the same results.
-
reporter Hello,
The branch “issue297-dipole-fringe” has been pushed.
Thank you and have a nice day
-
@Laurie Nevay , sure no problem. I’ll run it through the bdsim-testing code when the fix has been pushed.
-
The optics all match well with the fix, there doesn’t appear to be any tracking issues that have been introduced.
-
- changed status to resolved
I’ve merged the fix + user manual update into develop, and deleted the issue297-dipole-fringe branch.
- Log in to comment
The error seems to come from the non-initialisation of the Boolean
zeroStrength
when its value was false in the file BDSIntegratorDipoleFringe.cc line 80.