Recompute Krook argument after interpolation#183
Open
krystophny wants to merge 1 commit into
Open
Conversation
This was referenced Jul 13, 2026
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.
Recomputes the derived Krook argument
z0from interpolatedomega_E,k_parallel, collision frequency, and thermal velocity on the solver grid. Previously KIM interpolatedz0itself across thek_parallel=0singularity; a four-point polynomial stencil could produce order-1e12 values where the defining formula gives order 1e-3.The invariant is now
z0 = -(omega_E - omega - i nu)/(|k_parallel| sqrt(2) v_T)at every solver-grid point. Primitive profile interpolation, collision formulas, units, resonance convention, and boundary conditions are unchanged.Verification
Before: the synthetic coarse-to-solver-grid regression failed because interpolated
z0violated its defining formula.After: the focused regression passes; the full CMake build and all 30 CTest tests pass; bare
fopasses Static, Build, Tests, and Lint.At omega=1e5 and collision scale 1, the fix removes the Krook overflow and reduces the 64-point hat peak from 1.9e10 to 7e-3 statV. A controlled refinement excludes an earlier nominal 128-point run that accidentally retained omega=0. The valid gauge-removed 64-to-128 profile change is 0.093, but 128-to-256 changes by 7.32 and the peak grows from 7.1e-3 to 1.15e-1 statV. The Krook hat basis is therefore not grid-convergent and is not promoted to CTest.
Relation to Markus's Fokker-Planck periodic branch
This PR fixes an independent hat-path correctness defect: interpolate primitive quantities and recompute the singular derived Krook argument
z0. That invariant stands regardless of which periodic implementation survives. It may land independently when its own stack and CI are green; it does not count as FP validation.