-
Notifications
You must be signed in to change notification settings - Fork 99
Equation- and variable-based convergence checks #1448
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
base: develop
Are you sure you want to change the base?
Conversation
|
Next steps:
|
|
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
… in multiphysics convergence check.
…eadibility of output.
|
Most important changes which require a critical look:
|
…/pmgbergen/porepy into equation_based_convergence_check
| else: | ||
| if self.reference_value is not None: | ||
| return | ||
| self.reference_value = reference_value |
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.
Should we check that reference_value is not 0.0, as in the dict case?
| # subdomain neighbor. | ||
| assert all(isinstance(g, pp.BoundaryGrid) for g in grids), "Mixed grids" | ||
|
|
||
| # Return 1's for 0D boundaries |
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.
Should be all boundaries?
I would say that files that are (somewhat frequently) accessed by the user should go in init, else direct imports are okay.
As mentioned yesterday, I think this is fine. @IvarStefansson, do you agree?
As a rule, we have preferred explicit names. Having looked at the specifics, I have no objections. I will add some documentation to these classes, though.
I they are fine.
I see no problems. @IvarStefansson, I suppose you have had a look at this? Just to be sure.
I have no objections here. I realize we may need to further improve the flow of information when attacking issues related to the time stepping, but this to me looks like a step in the right direction.
I think these are reasonable. There are other ways of doing this and I suspect we will change things in the future, e.g., change the default criteria, but let's leave the code as it is for now.
I agree it is reasonable to aim for unity. My preferred design (which goes way beyond the scope of this project) is to do away with the notion of a linear problem altogether and let Newton sort out everything, but I'm fine with the current compromise. |
| # subdomain neighbor. | ||
| assert all(isinstance(g, pp.BoundaryGrid) for g in grids), "Mixed grids" | ||
|
|
||
| # Return 1's for 0D boundaries |
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.
While I remember it, we should make sure this is tested. This entails having a grid with a fracture that extends to the boundary, as the specific volume of the highest dimensional grid is 1.
Proposed changes
Regarding issue #1441. This PR introduces the option to filter residual and increment norms by equations and variables, respectively, to be used in the convergence checks. This PR introduces a separate mixin allowing to switch between the standard convergence check and a multiphysics one.
Minor breaking change: reference_residual is removed from the signature of the check_convergence method. Upstream adaptations are made to cleanup.
Types of changes
What types of changes does this PR introduce to PorePy?
Put an
xin the boxes that apply.Checklist
Put an
xin the boxes that apply or explain briefly why the box is not relevant.pytestwas run with the--run-skippedflag.