-
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
Line search #1208
Line search #1208
Conversation
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
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.
Partial review; I made to the point where the line search got technical. TBC.
ind = max_arg_1 - max_arg_2 | ||
if self.params.get("adaptive_indicator_scaling", False): | ||
# Scale adaptively based on the characteristic fracture traction estimate. | ||
# Base on all fracture subdomains. |
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.
You mean the same scaling is applied uniformly for all the subdomains?
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.
No, that it is computed based on the values from all fractures, not just the present one. This "feels" more robust. Let's discuss if necessary.
tol = 1e-1 | ||
f_0 = objective_function(0) | ||
f_1 = objective_function(1) | ||
if f_1 < model.params["nl_convergence_tol_res"] or (f_1 < f_0 / 1e4): |
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.
Is it correct that the first part here is an absolute criterion, while the second is effectively a relative criterion? How should these parameters relate to the Newton convergence parameters (if at all)? Maybe I'm just confused, but I'm not sure I agree with the comments in the lines below.
Then again, this is just an aid during the NL solution procedure and some pragmatism may be in order here. @jwboth What do you think?
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.
Yes, that's right. My thinking is that the residual/global line search is very unsophisticated, so I didn't bother to clean up hardcoded criteria etc. I think, however, that we can fairly safely remove the second criterion here. Would that be preferrable for now? Simpler=better, if no justification for more complex code...
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 think I've addressed most comments. Please let me know what you think, @keileg. If we can resolve (almost) everything, I'll close the PR and make a new one into develop.
List of unresolved questions/issues:
I suggest we take note of these, close and make a new PR. |
|
Proposed changes
This PR adds functionality for a line search to help convergence of multiphysics problems with fracture deformation.
Some of the functionality could be tested. To be discussed with reviewers. Same goes for naming and placement of code.
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.