Skip to content

Exact finite-difference-free quasisymmetry gradient for SIMSOPT #592

Description

@krystophny

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions