Skip to content

Commit

Permalink
Fixed several issues requested for commit
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexWiedman committed Nov 2, 2023
1 parent ae5daa8 commit ff23c3c
Show file tree
Hide file tree
Showing 6 changed files with 1,293 additions and 1,326 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@
# Define the individual terms objective function:
Jf = SquaredFlux(s, bs)
Jls = [CurveLength(c) for c in base_curves]
Jccdist = CurveCurveDistance(curves, CC_THRESHOLD, num_basecurves=ncoils) # Error
Jccdist = CurveCurveDistance(curves, CC_THRESHOLD, num_basecurves=ncoils)
Jcsdist = CurveSurfaceDistance(curves, s, CS_THRESHOLD)
Jcs = [LpCurveCurvature(c, 2, CURVATURE_THRESHOLD) for c in base_curves]
Jmscs = [MeanSquaredCurvature(c) for c in base_curves]
Expand Down
15 changes: 8 additions & 7 deletions src/simsopt/geo/curveplanarfourier.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,14 @@ class CurvePlanarFourier(sopp.CurvePlanarFourier, Curve):
where :math:`\theta` is the counterclockwise rotation about a unit axis
:math:`(\hat{x},\hat{y},\hat{z})`.
The quaternion is normalized for calculations to prevent scaling. The dofs
themselves are not normalized. This results in a redundancy in the
optimization, where several different sets of dofs may correspond to the
same normalized quaternion. Normalizing the dofs directly would create a
dependence between the quaternion dofs, which may cause issues during
optimization.
A quaternion is used for rotation rather than other methods for rotation to
prevent gimbal locking during optimization. The quaternion is normalized for
calculations to prevent scaling. The dofs themselves are not normalized. This
results in a redundancy in the optimization, where several different sets of
dofs may correspond to the same normalized quaternion. Normalizing the dofs
directly would create a dependence between the quaternion dofs, which may cause
issues during optimization.
The dofs are stored in the order
Expand Down
Loading

0 comments on commit ff23c3c

Please sign in to comment.