Merged
Conversation
jwboth
reviewed
Mar 25, 2025
Contributor
jwboth
left a comment
There was a problem hiding this comment.
To me the changes look good. What about the failing tests? Any insight @mariusnevland ?
As of now, the code does not change behavior compared to the previous code. Experience will show which of the two provided mixins for determining characteristic quantities is more often used.
jwboth
reviewed
Mar 27, 2025
keileg
reviewed
Mar 28, 2025
Co-authored-by: Jakub W. Both <73653591+jwboth@users.noreply.github.com>
IvarStefansson
approved these changes
Apr 10, 2025
Contributor
IvarStefansson
left a comment
There was a problem hiding this comment.
Thanks for the contribution!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Proposed changes
Regarding issue #1151. We remove the contact mechanics softening factor, and introduce two new mixins CharacteristicTractionFromDisplacement and CharacteristicDisplacementFromTraction. The former mixin fetches the characteristic displacement from the numerical constants and computes the characteristic traction by Hooke's law. The latter mixin does the opposite. Note that this is a breaking change, as the default value of the contact mechanics numerical constant has changed.
Note: test_time_dependent_bc() needed some quite significant changes, as the removal of the softening factor caused the Newton solver to not converge. This test is very sensitive to the value of the contact mechanics constant, and we might want to redesign the test. Also, a tiny relaxation of some absolute tolerances in test_contact_mechanics() was needed.
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.