Repository navigation
LocalStability - API! - Solve a LocalStabilityProblem from its own deck section - #568
Conversation
logan-nc
left a comment
There was a problem hiding this comment.
Read in full, plus the 25 decks. Two decisions for you, then ready to approve.
local_stability_flagis not in_DEPRECATED_FFS_KEYS(nor the pre-commit regex). Every deck that exists today has it, so every one of them now fails with an unknown-keywordMethodErrorrather than a message saying "use a[LocalStability]section". One tuple entry fixes it; I left it to you because it issrc/(stamp) and because #569 turns that list into a hard stop, which is the message you probably want here. It also collides with #546's two-pass test override (noted there).verboseno longer follows[ForceFreeStates] verbose:Ballooning.verbosedefaults totrue, so the bare[LocalStability]sections the three benchmark scripts generate now log verbosely. Fine if intended; one line in the body would do.
Smaller: Info/Runtimes/force_free_states shrinks by the local-stability time, which is now its own Info/Runtimes/local_stability entry; worth a line in the release note since people diff those.
Checked and clean: section coverage is exact (the 25 = true decks gain the block, the 2 = false decks lose the key, 19 example blocks are byte-identical, every line annotated per toml-conventions); no local_stability_flag/run_local_stability/compute_local_stability leftovers; Ballooning fields, local_stability_algorithm's key check, kernels' kwargs and api.md agree; HDF5 paths unchanged; harness diiid_n1 D_I/D_R/Δ' checksums identical.
Pushed 628ddfb (docs only): stability.md listed three diagnostics and omitted the α-boundary datasets the new section writes.
Merge-forward: 25 behind develop; git merge-tree shows 4 conflict hunks, all in GeneralizedPerturbedEquilibrium.jl.
|
Heads-up: GitHub did not start the pull-request workflows on 628ddfb (my push above); no check runs exist for it after an hour although Actions itself is fine. A close/reopen or your next push will re-fire them. The change is non- |
6d365b3 to
342a1b2
Compare
|
Thanks, all addressed; the branch is now rebased onto develop (578376d), which also re-fired CI.
Runtimes: added a release-note line about Merge-forward: done as a rebase rather than a merge. The 4 conflict hunks were resolved as develop's |
|
Re-read 342a1b2 after the rebase. Everything from the first review is in:
One mismatch in the body: the release note says harness @ 342a1b2, but the pasted report compares |
…section and ODE tolerances on Ballooning
…Stability] section
… the old key fail as an unknown keyword No backward-compatibility code: remove the EulerLagrangeProblem error for local_stability_flag, its deprecated-key pre-commit entry, the two tests asserting it errors, and the docs sentence naming it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ity stage Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0186CLfjeJeSusNTva5RMfGU
342a1b2 to
e018bce
Compare
Release note
local_stability_flagis removed. In a deck's[ForceFreeStates]it is a deprecated key, reported as deprecated (and, once deprecated keys stop the run, the run stops there); passed tosolve/EulerLagrangeProblemit fails as an unknown keyword. Storedgpec.h5files whose TOML sets it no longer replay the local-stability stage. Replacelocal_stability_flag = truewith a[LocalStability]section (copy it from any example deck) and deletelocal_stability_flag = false; scripts callsolve(LocalStabilityProblem(eq), Ballooning()).LocalStability.compute_local_stabilityis gone.LocalStability is now its own stage. A script calls
solve(LocalStabilityProblem(eq), Ballooning(; ...))and gets aLocalStabilityResultwith the MercierD_I, resistiveD_R, ballooning Δ' and first α-boundary profiles as named fields; a deck gets the same result through a[LocalStability]section whose keys are theBallooningknobs, now including the α-scan ψ window, search bound and bisection tolerance and the ballooning ODE tolerance. The HDF5 paths are unchanged.Info/Runtimes/force_free_statesno longer includes the local-stability scan, which now has its ownInfo/Runtimes/local_stabilityentry. The scan logs verbosely by default (verbose = true) instead of following[ForceFreeStates] verbose; setverbose = falsein[LocalStability]to quiet it.Regression report
Notes for reviewers
mainbuilds theBallooningfrom[LocalStability](unknown keys raise) and calls the samesolvea script calls, before ForceFreeStates, with its own banner andInfo/Runtimes/local_stabilityentry. The section's presence runs the stage; there is noenabledkey.mainalso returns the result aslocal_stability.local_stability_flagleftForceFreeStatesControl, andsolve(::EulerLagrangeProblem)no longer runs the scan (it used to compute it and drop it when HDF5 output was off).D_IandD_Rkeep the old(D·ψ)/ψarithmetic, andSingularSurfaces/D_Istill evaluates aSeriesspline ofD_I·ψat the singular surfaces: a plain-vector spline differs by up to 6e-14 off the knots, a one-columnSeriesmatches the old 5-column one exactly (checked at 2001 points on the DIII-D-like and Solovev decks).psi_window = (0.1, 0.99),max_alpha_scale = 8,alpha_tol = 1e-3,ode_tol = 1e-8. Every example and fixture deck lists all eight keys at their defaults.write_outputs_to_HDF5takes theLocalStabilityResultin place of the spline and α-boundary tuple and writes the same paths, with the same empty datasets when the stage is off; the save-method refactor will move this block.alpha_boundary_scantoForceFreeStatesControl; here the same knob, same name, lives onBallooningand[LocalStability].second_critical_ballooning_alphaand the q′ family), held until ForceFreeStates - FEATURE - 🌱 Make the ballooning alpha-boundary scan optional #494 is settled.test/runtests_localstability.jl(kernels, α window, knobs, solve writes no file, deck/API parity on the returned arrays and the HDF5 file, deck section parsing), plus a rerun check that the section replays.🤖 Generated with Claude Code