Repository navigation
Let reinit! keep the step-size controller history - #4400
Conversation
|
Not sure this actually fixes the root cause. Ofc this fixes the swing after reinit, but the initial swing is still present -- so the current behavior on master is the consistent one for PI. Given your reinit just sets qold = 1, why should we keep the qoldinit in first (or not simply default it to 1)? |
59b7b97 to
3cf93de
Compare
|
Switched to defaulting |
3cf93de to
1dd39b9
Compare
|
Tried your suggestion and it does not hold up, so I have reverted to the reinit-only change. Defaulting Exact is Across CI it took out 29 lanes that a comparable PR of mine does not touch: StochasticDiffEq, DelayDiffEq, Rosenbrock, Nordsieck, plus six root groups and four downstream packages. The ones I read are accuracy-at-requested-tolerance assertions, e.g. DelayDiffEq My earlier work-precision table was the wrong metric for this. Normalising to matched accuracy hides the fact that a user asking for So the initial swing stays for now. Reverting does not fix it, and you are right that it leaves PI asymmetric with PID and Predictive, but the neutral-everywhere version is not safe as it stands. |
Maybe I am missing something, but if we |
|
Why would |
1dd39b9 to
eb6b7d7
Compare
|
Both right, and I have replaced that commit. It no longer sets @termi-official yes, exactly that. Sending The initial swing is still there and PI is still asymmetric with PID and Predictive. I did not find a safe way to remove it, so this PR is only the mid-solve half. |
eb6b7d7 to
38d7f2c
Compare
38d7f2c to
7b5184c
Compare
- Fix StochasticDiffEqImplicit import ordering (#4408) - Fix TauLeaping JumpProblem initialization (#4409) - Fix dense output for the explicit multirate methods (#4233) - Let reinit! keep the step-size controller history (#4400) - Mark an operator Jacobian as updated when calc_W! moves it (#4354) - Restore weighted preconditioning and tolerances for default Krylov solves (#4391) Agent-Harness: Claude Code Agent-Model: claude-opus-5[1m] Claude-Session: https://claude.ai/code/session_014FEzNTLFutCmTEAZ3zBg5R Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
reinit!gains areinit_controller = truekeyword alongsidereinit_daeand friends, so a mid-solve restart can keep the PI controller's converged history; the default is unchanged,set_t!opts out, andDelayDiffEqgets the same keyword. It lives onreinit!rather thanreinit_controller!because the latter is public and the documented extension point for algorithm authors, so a keyword there would break downstream methods.reinit_controller!reseedserrold = qoldinit = 1e-4, right att0(Hairer's FACOLD) and wrong mid solve: on the issue's SDIRK2 problem a settleddtof 1.257538e-02 rings at ratios 0.20, 4.90, 0.41, 2.42 afterwards, and opting out reproduces the un-reinit'd sequence to 2.3e-6.reinit!still setssuccess_iter = 0, so the step after an opt-out restart is treated as a first step for the growth cap; measured in isolation that is a one-step lag, not the oscillation, and preserving it would also flip SDIRK's first-step predictor branches, so it is left for a separate change.reinit_test.jl31/31,disco_tests.jl28/28,controllers.jl30/30 with the new testset.Fixes #4371 for the mid-solve case; the first-step swing is untouched.
AI Disclosure: Claude assisted with this change.