PerturbedEquilibrium - DOCS - Delineate the boundary-response torque from the KineticForces NTV torque - #424
Merged
Merged
Conversation
…rces NTV torque GPEC now reports torque through two distinct constructions and will gain a third (the gpout_dw psi-resolved profile, issue #423): the PE scalar is the boundary quadratic form of the anti-Hermitian plasma inductance, equal to the volume-integrated Euler-Lagrange kinetic torque only for converged self-consistent solutions, and a distinct construction from the KineticForces energy-space NTV evaluation. State this in the struct docstring, the HDF5 long_name, and at the computation site so no output is just called 'torque'. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LzbLFQKyuRE5DYZmLokKmk
logan-nc
added a commit
that referenced
this pull request
Aug 22, 2026
… PR #424 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LzbLFQKyuRE5DYZmLokKmk
…m the torque annotation commit The previous commit ran through JuliaFormatter, collapsing the hand-maintained alignment in Utils.jl and PerturbedEquilibriumStructs.jl and re-indenting two docstring bullet lists. None of that is part of the torque delineation, and it buries the three substance hunks in ~120 lines of whitespace noise. Restore the pre-commit formatting so the PR diff is exactly the docstring, the HDF5 long_name, and the computation-site comment. A broader reformatting pass is planned separately. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CV1jBWtEgxA1aQvjB9SBhs
…nnotation The eight-line bullet added to PerturbedEquilibriumState read as session notes rather than a field description, against the concise-comment standard in CLAUDE.md. Cut it to three lines carrying the three facts a reader needs: it is the boundary-response torque, it matches the volume-integrated Euler-Lagrange kinetic torque only for converged self-consistent solutions, and it is a distinct construction from the KineticForces NTV torque. The δW surface-term derivation and the grid-quality-diagnostic commentary belong in the docs, not the struct docstring. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CV1jBWtEgxA1aQvjB9SBhs
…gies docstring The `plasma_energy` bullet in the PerturbedEquilibriumState docstring carried a trailing "# Response fields in mode space [npsi, mpert]" — a struct-body comment that leaked into the docstring, where it duplicates the real comment above the xi_modes/b_modes fields and renders as part of the energy description. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CV1jBWtEgxA1aQvjB9SBhs
logan-nc
enabled auto-merge
September 4, 2026 16:36
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.
Small clarity fix prompted by issue #423's torque cross-validation:
PerturbedEquilibrium/Energies/toroidal_torquewas annotated simply as "net toroidal torque on the plasma", which invites direct comparison withKineticForces/<method>/total_torque— a distinct construction.This PR renames nothing (clean-break renames deferred until the gpout_dw port lands, issue #423) but states the delineation in all three places a user would look: the
PerturbedEquilibriumStatedocstring, the HDF5long_name, and the computation site inResponse.jl. The delineation:−2n·Im⟨Φ_tot, Λ⁻¹Φ_tot⟩/4— the anti-Hermitian boundary quadratic form. Equals the volume-integrated Euler–Lagrange kinetic torque for converged self-consistent solutions (δW surface-term identity); their numerical difference is a solution/grid diagnostic.gpout_dw, unported — issue Port gpout_dw / gpout_dw_matrix (psi-resolved torque response profiles and matrices) as the grid-logic diagnostic #423): same model, volume-resolved.KineticForces/): independent energy-space bounce-average evaluation; agreement with the above tests whether the EL matrices faithfully discretize the drift-kinetic operator.Release note
The
toroidal_torqueoutput in the perturbed-equilibrium results is now documented as the boundary-response torque, distinguishing it from the separately-computed NTV torque underKineticForces/. No output was renamed or moved and no value changed; only the docstring, the HDF5long_nameattribute, and a source comment.Regression report
Notes for reviewers
The branch history has two cleanup commits on top of the original annotation commit, which are worth reading in order:
b211020freverts JuliaFormatter churn that the first commit had swept in (~120 lines of collapsed column alignment inUtils.jlandPerturbedEquilibriumStructs.jl). A broader reformatting pass is planned separately; this PR deliberately carries none of it, so the net diff is three hunks in three files.22f62810cuts thetoroidal_torquedocstring bullet from eight lines to three, keeping only the boundary-response identification, the converged-solution equivalence, and the distinction from the NTV torque.101eedb3drops a stray# Response fields in mode space [npsi, mpert]that had leaked from the struct body onto the end of theplasma_energydocstring bullet.developis merged in (4a3c163a); the one non-trivial overlap was inResponse.jl, where develop'sffit::FourFitVars→mats::MatrixSplinesrename sits two lines below the comment this PR adds. Both sides merged cleanly and the package precompiles.🤖 Generated with Claude Code
https://claude.ai/code/session_01LzbLFQKyuRE5DYZmLokKmk