Repository navigation
Resize SDC's per-node vectors and node solvers in place - #4673
Merged
Merged
Conversation
singhharsh1708
force-pushed
the
sdc-resize-in-place
branch
from
September 28, 2026 14:40
f905287 to
0cc0a42
Compare
This was referenced Oct 1, 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.
In-place
SDCsupportsresize!of the integrator, as from a callback that grows the state.The per-node vectors and the node solvers in
nlsolverssit outsidefull_cacheand outside thenlsolverfield thatresize_nlsolver!reads, so every step after a resize threw aDimensionMismatch;resize_non_user_cache!forSDCCachenow resizes them and resets each Newton solver, asresize_nlsolver!does.Growing
u' = -ufrom 2 to 3 components at t = 0.5 matches the exact solution to within 4e-11 with the LU and MIN-SR-S sweepers, adaptively, threaded and on a split problem, and the new test errors on master. Out of place,resize!is unsupported for every method, since constant caches have nofull_cache(Rosenbrock23 throws the same way). The dense-output rates that #4571 added (kdense, whichintegrator.kaliases) are resized too; without them the test fails the same way on current master.AI Disclosure: Claude assisted with this change.