Skip to content

Resize SDC's per-node vectors and node solvers in place - #4673

Merged
ChrisRackauckas merged 1 commit into
SciML:masterfrom
singhharsh1708:sdc-resize-in-place
Sep 28, 2026
Merged

ChrisRackauckas merged 1 commit into
SciML:masterfrom
singhharsh1708:sdc-resize-in-place

Conversation

@singhharsh1708

@singhharsh1708 singhharsh1708 commented Sep 28, 2026 •

Copy link
Copy Markdown
Member

In-place SDC supports resize! of the integrator, as from a callback that grows the state.
The per-node vectors and the node solvers in nlsolvers sit outside full_cache and outside the nlsolver field that resize_nlsolver! reads, so every step after a resize threw a DimensionMismatch; resize_non_user_cache! for SDCCache now resizes them and resets each Newton solver, as resize_nlsolver! does.
Growing u' = -u from 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 no full_cache (Rosenbrock23 throws the same way). The dense-output rates that #4571 added (kdense, which integrator.k aliases) are resized too; without them the test fails the same way on current master.
AI Disclosure: Claude assisted with this change.

@ChrisRackauckas
ChrisRackauckas merged commit cc57721 into SciML:master Sep 28, 2026
131 of 135 checks passed
@singhharsh1708
singhharsh1708 deleted the sdc-resize-in-place branch September 28, 2026 19:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants