-
Notifications
You must be signed in to change notification settings - Fork 90
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
Turn off redundant residual computations if tolerance np.inf #1229
base: develop
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like the idea to avoid computation. Please consider the comment about optional arguments in particular.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With your clarification of Optional, the rest should be easy.
Co-authored-by: Ivar Stefansson <[email protected]>
…github.com/pmgbergen/porepy into maint-omit-redundant-residual-computations
Sorry for the massive delay...I fixed the remaining issues and followed all of your suggestions. |
I think this should be fine now, but please have a short look as well @IvarStefansson. |
Proposed changes
This is a minor change. Currently, the residual is always computed as part of the convergence check. However, in the case when the tolerance for the residual is
np.inf
, which is also the default value, this computation is redundant. This PR suggests turning off the unnecessary computation. This leads to some design choice how to forward empty residuals and norms. There may be other solutions. I am open for comments.Types of changes
What types of changes does this PR introduce to PorePy?
Put an
x
in the boxes that apply.Checklist
Put an
x
in the boxes that apply or explain briefly why the box is not relevant.pytest
was run with the--run-skipped
flag.