Repository navigation
Equilibrium - FEATURE - Warn when a g-file's FPOL is single precision and the run computes Δ′ - #596
Merged
Conversation
… and the run computes Δ′ GPEC splines FPOL and differentiates it, so the rounding of a single-precision FPOL column becomes noise of order ±2–3 on Δ′ at 257 radial nodes. Runs with the riccati or galerkin integrator on such a g-file now warn and suggest regenerating it in double precision. The check is gfile_fpol_single_precision: every FPOL value within 1e-8 of its Float32 rounding. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…le-precision-fpol-warning # Conflicts: # src/GeneralizedPerturbedEquilibrium.jl
Collaborator
|
Merged develop and ported |
Collaborator
|
@d-burg do you want review on this now? It is marked as a draft still |
…le-precision-fpol-warning
d-burg
marked this pull request as ready for review
October 27, 2026 18:49
Collaborator
Author
|
@matt-pharr yes please, and thanks for porting the check into |
matt-pharr
approved these changes
Oct 28, 2026
matt-pharr
left a comment
Collaborator
There was a problem hiding this comment.
Useful change and something we should all be more aware of in Delta' world :)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Release note
GPEC splines a g-file's FPOL and differentiates it, so when FPOL was written in single precision its rounding becomes noise in Δ′: about ±2–3 on Δ′(2/1) at 257 radial nodes on DIII-D-like files. Runs with the
riccatiorgalerkinintegrator on such a file now warn and suggest regenerating it in double precision. This is the alternative to #506 agreed there.Changes
Equilibrium.gfile_fpol_single_precision(filename)(inEquilibrium/Sources/GFile.jl) reads only the header and the FPOL block, and returns true when every value lies within 1e-8 (relative) of its Float32 rounding.g65.geqdskandEQDSK_COCOS_02are not.main_from_inputswarns once, after the equilibrium is built, for EFIT-type equilibria whose integrator computes Δ′. The warning names the file.Regression report
regress --cases diiid_n1_riccati,solovev_n1,efit_fixedbdy_separatrix --refs 0b4b9fbfb,6bf955b94 --forceon feynman (SLURM, 8 threads, manifest pinned), after merging develop at0b4b9fbfb: every case is unchanged.runtests_equil.jlpasses (332/332).diiid_n1_riccatisolovev_n1efit_fixedbdy_separatrixNotes for reviewers
TkMkr_D3Dlike_Hmode.geqdsk, used by most DIII-D-like examples and harness cases, and theefit_fixedbdyexample file are both single precision, so riccati and galerkin runs on them now warn. That is accurate. Regenerating them with OFT's double-precision writer would remove the noise, but it would move every pinned Δ′, so it belongs in its own PR.main, so a script that calls the solver API directly does not get it.🤖 Generated with Claude Code