Repository navigation
PointDipoleField: point dipoles with the moments as dofs - #153
Open
rogeriojorge wants to merge 26 commits into
Open
rogeriojorge wants to merge 26 commits into
rogeriojorge wants to merge 26 commits into
Conversation
The step that crosses the LCFS ends outside the |B| and profile tables, where the spline extrapolation can return a meaningless |B|. Its end point was kept as the held state and its energy error entered energy_error. Saved states now hold the last interior state; the exterior end point and its energy error are reported separately in terminal_states and terminal_energy_error (NaN unless lost). Loss and failure classification is unchanged. Fixes #115
…as dofs B(x) = mu0 / (4 pi) sum_j [3 (m_j . r_j) r_j / |r_j|^5 - m_j / |r_j|^3] for dipoles at fixed positions; the moments are the optimization dofs, so the field adds to coils (coils + dipoles) and differentiates with respect to the moments. Named apart from the permanent-magnet DipoleField of #32, which optimizes scalar strengths of fixed orientations through an interaction matrix. The pytree unflattens without __init__, since transforms put non-array leaves in its slots.
This was referenced Oct 7, 2026
…int-dipole-field # Conflicts: # tests/test_fields.py
Keep Boozer splines continuous and avoid duplicate m=0 storage
Boozer tracer: keep exterior terminal step out of interior diagnostics
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.
Stacked on the field-classes PR.
B(x) = mu0/(4 pi) sum_j [3 (m_j . r_j) r_j / |r_j|^5 - m_j / |r_j|^3]for dipoles at fixed positions. The moments are the dofs, socoils + dipolestraces and differentiates like any field.It is named apart from the permanent-magnet
DipoleFieldof #32, which optimizes scalar strengths of fixed orientations through an interaction matrix. The two can coexist.Tests check the on-axis formula, zero curl and divergence, the gradient in the moments, and field lines in coils plus dipoles.