Skip to content
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

simplify __wrapprecs #465

Merged
merged 6 commits into from
Sep 28, 2024
Merged

simplify __wrapprecs #465

merged 6 commits into from
Sep 28, 2024

Conversation

oscardssmith
Copy link
Contributor

previously the preconditioner being set was a very complicated IdentityOperator. Using a regular IdentityOperator means that solvers that don't support one of the preconditioners won't throw warnings since they mostly know that IdentityOperators aren't real.

@oscardssmith
Copy link
Contributor Author

Note that this will be obsoleted by #462 but that Pr is slightly breaking so it may need some more time.

@ChrisRackauckas
Copy link
Member

@avik-pal is all of the test failures known?

@avik-pal
Copy link
Member

Pretty much. We need a tag with updated enzyme releases

@avik-pal
Copy link
Member

I have marked master version as -DEV to avoid an accidental release

@avik-pal
Copy link
Member

once I merged the DI PR, it will fix the dep hell

oscardssmith and others added 4 commits September 27, 2024 16:32
previously the preconditioner being set was a very complicated `IdentityOperator`. Using a regular `IdentityOperator` means that solvers that don't support one of the preconditioners won't throw warnings since they mostly know that `IdentityOperator`s aren't real.
@avik-pal
Copy link
Member

Remove those imports and that should do it

@oscardssmith
Copy link
Contributor Author

imports removed.

src/NonlinearSolve.jl Outdated Show resolved Hide resolved
@avik-pal avik-pal merged commit d6d741b into master Sep 28, 2024
35 of 36 checks passed
@avik-pal avik-pal deleted the os/simplifiy-wrapprecs branch September 28, 2024 02:13
if __hasfield(alg, Val(:precs))
precs = alg.precs
Pl_, Pr_ = precs(A, nothing, u, ntuple(Returns(nothing), 6)...)
else
precs, Pl_, Pr_ = nothing, nothing, nothing
end
Pl, Pr = __wrapprecs(Pl_, Pr_, weight)
Pl, Pr = __wrapprecs(Pl_, Pr_, u)
Copy link
Member

Choose a reason for hiding this comment

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

Is that correct?

Copy link
Member

Choose a reason for hiding this comment

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

It is creating an operator using only the length of u

Copy link
Contributor Author

Choose a reason for hiding this comment

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

specifically, NonlinearSolve never actually used the weight variable.

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