Skip to content

Stabilize DESC radial evaluation and prune zero Fourier modes - #10

Merged
eepeterson merged 3 commits into
eepeterson:stellarator_sourcefrom
paulromano:stellarator_source
Sep 29, 2026
Merged

eepeterson merged 3 commits into
eepeterson:stellarator_sourcefrom
paulromano:stellarator_source

Conversation

@paulromano

Copy link
Copy Markdown

This PR makes three small improvements:

  • Evaluate Zernike radial polynomials using SciPy's Jacobi polynomials instead of the alternating factorial sum, avoiding cancellation at high radial orders
  • Drop converted Fourier modes whose R and Z coefficients are exactly zero on every radial surface. This preserves the represented geometry while reducing setup and sampling work. I've run into some cases where the highest order l/m can be all zeros, so this can actually help reduce the maximum order in that case.
  • Restore unrelated settings documentation that was inadvertently reverted on the branch

@eepeterson eepeterson left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@eepeterson
eepeterson merged commit 6fad81b into eepeterson:stellarator_source Sep 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants