Skip to content

Make GenericLUFactorization bypass overloads when used on DualLinear Problems #685

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 8 commits into from
Aug 8, 2025

Conversation

jClugstor
Copy link
Member

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

Needed so that GenericalLUFactorization on DualLinearProblems can go through the normal init.
It's a little bit clunky but I don't think there's another way to exclude specific algorithms from going through the Dual version of init. Plus this way is explicit about exactly which algorithms will go through the Dual overloads.

@ChrisRackauckas
Copy link
Member

It would be better to opt out instead of opt in. A way to do this is to make init call __init. Make the current init change to this __init function. Define init(::DualLinearProblem) to call __dualinit which is the dual one. And then define init(::DualLinearProblem, ::GenericLUFactorization) to call __init

@jClugstor jClugstor changed the title Add list of solvers acceptable for going through Dual overloads Make GenericLUFactorization bypass overloads when used on DualLinear Problems Aug 7, 2025
@@ -87,13 +87,6 @@ backslash_x_p = A \ new_b
@test (x_p, backslash_x_p, rtol = 1e-9)

# Nested Duals
function h(p)
Copy link
Member

Choose a reason for hiding this comment

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

why was this removed?

Copy link
Member Author

Choose a reason for hiding this comment

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

It was a duplicate definition, it's first defined up above.

@jClugstor
Copy link
Member Author

Looks like some precompilation issues are happening? I can't seem to replicate the failures locally.

@ChrisRackauckas ChrisRackauckas merged commit 499e760 into SciML:main Aug 8, 2025
301 of 334 checks passed
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