Replace ZEAL with fortnum complex_region_roots in WKB dispersion (Z1)#148
Open
krystophny wants to merge 1 commit into
Open
Replace ZEAL with fortnum complex_region_roots in WKB dispersion (Z1)#148krystophny wants to merge 1 commit into
krystophny wants to merge 1 commit into
Conversation
This was referenced Jun 14, 2026
7a3574a to
7a8cbba
Compare
756729d to
7af37fd
Compare
7af37fd to
3c324f6
Compare
This was referenced Jun 14, 2026
1156c85 to
02f5948
Compare
00e2522 to
85718ca
Compare
3 tasks
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.
Merge order
These fortnum-migration PRs are individually based on
mainand form onecumulative stack. Merge them in this order:
#140 -> #141 -> #142 -> #143 -> #144 -> #145 -> #146 -> #147 -> #148 -> #149 -> #150
Each PR is opened against
main, so its diff is cumulative versusmainandoverlaps its predecessors. Merging in the order above keeps the history linear:
once a predecessor merges into
main, the next PR's diff shrinks to just itsown increment.
First of three stacked PRs (Z1-Z3) that finish removing the avoidable upstream numerical dependencies from KIM onto fortnum, completing the GSL/AMOS/SLATEC/QUADPACK removal. Base of this PR is the fortnum k8-plumbing tip (PR #147).
What changed
run_ZEAL_dispersiondrove the bundled ZEAL package (zeal(),set_zeal_search_region, theZeal_Module/Zeal_Input_Module/Function_Input_Moduletriple,VALREG, and the netlibdqagxcontour quadrature) to find the complex zeros of the kinetic dispersion relation over a rectangular search box. It now drives fortnumcomplex_region_rootsover the same box (center +/- halfwidth maps to thell/urcorners). The per-branch focused search, the broad search, multiplicities, and theWKB_dispersion_solver='ZEAL'config option are preserved; only the dependency internals change.The KIM dispersion functions move onto the fortnum
complex_root_fn_tABI via thedispersion_region_fnadapter.Function_Input_Moduledrops itsPrecision_Moduledependency (usesKIM_kinds_m) and the ZEAL-onlyVALREG.zeal_input.f90,test_zeal.f90,FetchZeal.cmake, theexternal_zealsource set, and the now-unuseddqagxsource are removed.fortnum is pinned to 38a5110, which provides
complex_region_rootsand the LAPACK-backed eigensolve, guarded byif(NOT TARGET fortnum).Verification
Full CMake/Ninja build at the stack tip (fortnum 38a5110), then ctest. The new
test_region_roots_vs_mullercross-checks thatcomplex_region_rootsand the in-tree Muller solver return the same zeros on one analytic test function to within 1e-6.Before (on the base branch the ZEAL package is fetched and compiled; no region/Muller equivalence test exists).
After:
Stack reconciliation (update)
The migration stack was rebuilt as a strictly linear cumulative chain on main
428a708:Every branch now pins fortnum to main
974dcf1(all kernel fixes plus both new integrators). This branch's standalone golden result above stands. The cumulative tip (#150 z3) does not pass: the KiLCA background equilibrium ODE on#143 k4cannot reproduce the GSLrk8pdgolden with DOP853 at the unchanged1e-8bar. See#143and#150. Tolerances were not weakened and the stored golden was not regenerated.Merge order:
#140 -> #141 -> #142 -> #143 -> #144 -> #145 -> #146 -> #147 -> #148 -> #149 -> #150.Note: fortnum pin updated to current main (92de6e9) after a fortnum history rewrite; old shas no longer resolve.