Skip to content

Use separate cache flags for A and b in ForwardDiff extension#1054

Closed
hersle wants to merge 1 commit into
SciML:mainfrom
hersle:cache_separate_A_b
Closed

Use separate cache flags for A and b in ForwardDiff extension#1054
hersle wants to merge 1 commit into
SciML:mainfrom
hersle:cache_separate_A_b

Conversation

@hersle

@hersle hersle commented Jun 20, 2026

Copy link
Copy Markdown
Contributor

Avoids updating A if only b changes (e.g. in an ODE) and vice versa.

@ChrisRackauckas

Copy link
Copy Markdown
Member

This needs tests.

ChrisRackauckas added a commit that referenced this pull request Jun 26, 2026
…#1054 + test) (#1062)

* Use separate cache flags for A and b (faster when only one changes)

* Test separate A/b partials validity flags in DualLinearCache

Verify that mutating only A or only b invalidates that side's partials
list independently, that solving revalidates both, and that the result
stays correct across one-sided updates.

Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>

---------

Co-authored-by: Herman Sletmoen <hermansletmoen@gmail.com>
Co-authored-by: ChrisRackauckas-Claude <accounts@chrisrackauckas.com>
@ChrisRackauckas

Copy link
Copy Markdown
Member

Rebased and finished in #1062, just needed to update but basically was taken in as-is with your commit.

@hersle

hersle commented Jun 26, 2026

Copy link
Copy Markdown
Contributor Author

That's ok, thanks a lot for following it through! I appreciate it, as my time to follow up is a bit limited :)

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