-
-
Notifications
You must be signed in to change notification settings - Fork 55
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
reinit!
calls precs
three times
#527
Comments
good catch. I added the reinit before the set property so I forgot about the interaction. fix incoming |
a |
Why would it actually make the new prec instead of just setting a flag to make a prec and then make at the next solve step? |
oh, we could possibly used cache.isfresh for this... that's interesting |
Yes because you only have to update the precs when A changes, which is when |
Describe the bug 🐞
In
reinit!
. preconditioner construction via precs is called several times: once in the method itself, and then bycache.A=A
andcache.p=p
(triggered bysetproperty
).Expected behavior
I would expect that the preconditioner is updated only once.
Minimal Reproducible Example 👇
Output
Discussion
I think that the
setproperty
overload forcache.A
andcache.p
is notnecessary. In any case I find it a bit dangerous.
As a feature request, I would like to see a kwarg
keep_precs
, allowingto
reinit!
without updating Pl, Pr in a transparent manner.I could try a corresponding PR once this is fixed.
The text was updated successfully, but these errors were encountered: