Repository navigation
Rebuild the linear W whenever gamma dt changes on fixed steps - #4401
Merged
Merged
Conversation
singhharsh1708
force-pushed
the
fix-linear-W-cutoff
branch
2 times, most recently
from
August 29, 2026 08:14
97d5411 to
08e31b0
Compare
Member
|
This should get updated for LHL |
singhharsh1708
force-pushed
the
fix-linear-W-cutoff
branch
from
August 30, 2026 07:53
08e31b0 to
3a31ac5
Compare
Member
Author
|
Updated: with LHL the cutoff is now zero on adaptive steps too. Correction to what I wrote first: LHL already read the new γdt from |
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.
On fixed steps the linear-operator path kept a stale
W = M - γ dt Jwheneverdtdrifted by less thannew_W_dt_cutoff, soadaptive = falsesolves reusedWacross step-size changes; the cutoff is now zero unless the solve is adaptive. Comparingγ dtrather than forcing a rebuild halves the factorisations, because the two stages of a step share oneW, andnjacsstays 0 on the linear path.On the issue's problem with
dtalternating against1.15 dt, exactWconverges at second order (0.0159, 0.00443, 0.00117 over three halvings) while the default cutoff stalled near 6.5e-3; after the change both cutoffs give identical results.The test steps a
MatrixOperatorproblem with alternating fixed steps, instale_w_linear_operator_tests.jl, which already covers the sibling stale-Wbug #3933. The adaptive half of #4370, where a carried-overηlets Newton stop early against a staleW, is separate.Fixes the fixed-step half of #4370.
With
LHLFactorizationthe W stays split and LHL absorbs each new γdt fromW.gammaon every solve, but inside the cutoffW_γdtwas left at the old value, so the Newton step'sdzrescale incompute_step!corrected for a staleness that was not there; the cutoff is now zero for a split W on adaptive steps as well, which keepsW_γdtequal to γdt and drops the rescale. The new test checks cutoff 0.2 and 0 give identical results with LHL, adaptive and fixed-step; on master the end states differ.AI Disclosure: Claude assisted with this change.