Integrate the equilibrium ODE with fortnum DOP853 instead of ddeabm (Z2)#149
Open
krystophny wants to merge 1 commit into
Open
Integrate the equilibrium ODE with fortnum DOP853 instead of ddeabm (Z2)#149krystophny wants to merge 1 commit into
krystophny wants to merge 1 commit into
Conversation
This was referenced Jun 14, 2026
756729d to
7af37fd
Compare
67351be to
e605baa
Compare
e605baa to
124517b
Compare
This was referenced Jun 14, 2026
124517b to
f68bc2c
Compare
1a8f62f to
72c8dab
Compare
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.
Integrate the equilibrium ODE with fortnum ddeabm (Z2)
KIM/src/background_equilibrium/calculate_equil.f90now integrates the scalar force-balance ODEdu/drwith the fortnum variable-order Adams integrator (fortnum_ode_ddeabm), a clean-room equivalent of SLATEC ddeabm. This replaces the earlier DOP853 substitution and restores the original SLATEC continuation semantics.One
ddeabm_initseeds the state atr_grid(1). Each outer grid valueu(i)continues the same re-entrant state tor_grid(i)(the SLATECINFO(1)=1restart), with the step barred from overshootingr_grid(end)(theRWORK(1)/INFO(4)=1tstop bound).idid < 1maps to the existinglog_warningpath viaode_status%code /= FORTNUM_OK.The original scalar RHS
dudr(r, u, du)is wrapped as the array-valuedode_rhs_tcallbackdudr(r, u, du, ctx)withneq = 1; the q-profile and pressure data ride on host association, soctxis unused.Cumulative on
#148 z1; fortnum pinned to main974dcf1.Verification
This rewire compiles and runs on the cumulative tip. The KIM equilibrium quantities it feeds are not isolated in the golden comparison set; the tip golden failures all trace to the KiLCA background ODE on
#143 k4(see that PR), not to this change. No new failure category appears at this branch.Tolerances unchanged (rtol=1e-12, atol=1e-12 for this ODE; golden bar rtol=1e-8 atol=1e-15).
Note: fortnum pin updated to current main (92de6e9) after a fortnum history rewrite; old shas no longer resolve.