Skip to content

Add KnownJacobianSparsityDetector and KnownHessianSparsityDetector #81

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Sep 4, 2024

Conversation

adrhill
Copy link
Contributor

@adrhill adrhill commented Sep 3, 2024

Checklist

  • Appropriate tests were added
  • Any code changes were done in a way that does not break public API
  • All documentation related to code changes were updated
  • The new code follows the
    contributor guidelines, in particular the SciML Style Guide and
    COLPRAC.
  • Any new documentation only uses public API

Additional context

Adds KnownJacobianSparsityDetector and KnownHessianSparsityDetector, closing #80.

Copy link
Collaborator

@gdalle gdalle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is exactly how I would have coded it too, thanks for this contribution!

@adrhill
Copy link
Contributor Author

adrhill commented Sep 3, 2024

Are we ok with the KnownJacobian/KnownHessian prefix?
Another option that comes to my mind is ManualJacobian. SparseDiffTools calls it JacPrototype but I find the others to be more informative.

@adrhill adrhill requested a review from gdalle September 3, 2024 16:31
@gdalle
Copy link
Collaborator

gdalle commented Sep 3, 2024

I would prefer Fixed to Known

@gdalle
Copy link
Collaborator

gdalle commented Sep 3, 2024

Let's wait until @ChrisRackauckas gives an opinion on this

@adrhill
Copy link
Contributor Author

adrhill commented Sep 3, 2024

I would prefer Fixed to Known

Then let me throw Constant into the ring as well. ;)

@ChrisRackauckas
Copy link
Member

I'd go with Known. Constant or Fixed isn't really correct, because that's more information about the sparsity pattern itself rather than information about whether it's already known. I could see constant or fixed information being used as a specialization to know that you don't need to handle certain elements of conditional handling in the sparsity detection (i.e. the concolic execution of the original algorithm) if you knew that you always had a fixed pattern and don't need to take the union.

@gdalle
Copy link
Collaborator

gdalle commented Sep 4, 2024

Let's go with Known then.

@gdalle gdalle merged commit f206682 into SciML:main Sep 4, 2024
4 checks passed
@adrhill adrhill deleted the ah/known branch September 4, 2024 13:39
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.

3 participants