User story
As a quasisymmetry-optimization user, I get dQS/dx with no finite differences, matching SIMSOPT's QuasisymmetryRatioResidual, so QS optimization converges with far fewer equilibrium solves.
Scope
qs_harmonics_kernel.h: flat-buffer forward transform of the field harmonics SIMSOPT QS reads, plus the analytic adjoint and tangent (the transform is linear in every field but |B|, which has a closed-form derivative).
- pybind:
qs_harmonics, the reverse exact_qs_objective_state_gradient (O(1) in boundary DOFs), and the forward exact_qs_harmonics_tangent (the exact Gauss-Newton residual Jacobian).
Benefit
Gauss-Newton QS optimization converges in about 64 equilibrium solves versus about 1288 with finite differences, matching SIMSOPT's objective bit-for-bit. Depends on the exact HVP (#582).
Closes when #585 merges.
User story
As a quasisymmetry-optimization user, I get dQS/dx with no finite differences, matching SIMSOPT's QuasisymmetryRatioResidual, so QS optimization converges with far fewer equilibrium solves.
Scope
qs_harmonics_kernel.h: flat-buffer forward transform of the field harmonics SIMSOPT QS reads, plus the analytic adjoint and tangent (the transform is linear in every field but|B|, which has a closed-form derivative).qs_harmonics, the reverseexact_qs_objective_state_gradient(O(1) in boundary DOFs), and the forwardexact_qs_harmonics_tangent(the exact Gauss-Newton residual Jacobian).Benefit
Gauss-Newton QS optimization converges in about 64 equilibrium solves versus about 1288 with finite differences, matching SIMSOPT's objective bit-for-bit. Depends on the exact HVP (#582).
Closes when #585 merges.