Repository navigation
fix: correct higher multipole field components - #194
Open
zhaozhiwen wants to merge 1 commit into
Open
zhaozhiwen wants to merge 1 commit into
zhaozhiwen wants to merge 1 commit into
Conversation
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix quadrupole and higher multipole field components
The multipole plugin returned the radial quadrupole field
(Gx, Gy, 0), which has nonzero divergence and does not respond to roll. Use the normal higher-multipole component convention so the quadrupole returns(Gy, Gx, 0). Preserve the existing dipole direction, uniform longitudinal mode, unit parsing, and coordinate transforms.Add a regression that loads the real field plugin and checks independent quadrupole/sextupole reference vectors, X/Y/Z axes, displaced origin, roll, divergence/curl, and dipole/longitudinal compatibility.
Validation:
Bx=0, By=10 Gat(1 mm, 0, 0)for the 1-T-at-1-m quadrupole; a 45-degree roll givesBx=-10 G.db22b3c1, AlmaLinux 10.2, GCC 14.3.1, Geant4 11.4.3, Meson 1.12.1.The broader source-example sweep has a separately recorded baseline of 19/32 passing, including missing geometry/setup failures. This change validates the affected field module and does not claim a clean full-project suite.
Closes #185.
Verification on 2026-11-15: all 44 selected affected regressions passed again on the combined nine-fix source. Each issue also has a separate failing-original/passing-fixed regression. These PR branches each contain only their own fix; shared-file conflicts may need resolving as other fixes merge. No clean full-project-suite claim: the broader source-example baseline remains 19/32, with no newly failing examples in the combined sweep.