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.
I wanted to add a toroidal field to a configuration, because I just wanted to jiggle the rotational transform a bit without too much ado. That would be nice with a straight coil along the z-axis, so I coded it up using the JaxCurve.
(Yes upon writing this PR I see that ToroidalBfield exists, but it does not allow one to shift the location of the curve along Z (playing with a 1/1 component), or optimize with it).
Think this might be useful for others, @krystophny has mentioned wanting to do something similar but resorting to using very large radius coils.
Some of the unittests are failing, mostly because the curve is not curved, and the evaluation of Kappa and it's derivatives fail. In that regard, what would be the best fix?
kappa
,torsion
etc functions and their derivatives in theCurveAlongZ
class with a default choice.Curve
methods of evaluation ofkappa
,torsion
etc and their derivatives to deal with straight sections.option 1 would work, but lead to code repitition if other curves with straight sections are implemented
option 2 could lead to unneccesary computational overhead if every field evaluation
nan
s need to be replaced@andrewgiuliani @florianwechsung, any suggestions as to the best approach?