Skip to content
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

[GeoMechanicsApplication] Fix settlement differences in results for cauchy stress #11870

Conversation

rfaasse
Copy link
Contributor

@rfaasse rfaasse commented Dec 4, 2023

📝 Description
This PR removes some unintended side-effects in the time step executor by removing the 'IsConverged' call and getting the convergence state directly form the SolveSolutionStep function.

🆕 Changelog

  • Removed the IsConverged call from the TimeStepExecutor
  • Made formatting changes using clang format/tidy in the relevant files.
  • Made a minor change in the .clang-format file to allow for single-line functions

@rfaasse rfaasse changed the title Geo/11869 fix settlement differences in results for cauchy stress [GeoMechanicsApplication] Fix settlement differences in results for cauchy stress Dec 4, 2023
@@ -16,14 +16,16 @@
#include <memory>
Copy link
Contributor Author

@rfaasse rfaasse Dec 4, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I used clang format on this file (and some others), which is why there are so many diffs

@@ -9431,7 +9431,7 @@ Values
365 2.14766e-05 -0.000360341 0 9.51122e-06 0 0
5.36916e-06 -0.000350692 0 5.06429e-06 0 0
5.36916e-06 -0.00034908 0 1.43639e-05 0 0
366 4.84909e-05 -0.000380399 0 8.19316e-12 0 0
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are two of these very minor changes in the stage 3 res file. I think they are acceptable, let me know what you think

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be acceptable.

@@ -39,7 +39,7 @@
"rayleigh_m": 0.0,
"rayleigh_k": 0.0,
"strategy_type": "newton_raphson",
"convergence_criterion": "displacement_criterion",
"convergence_criterion": "residual_criterion",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is to make sure the residual_criterion is also covered. Indeed, the test failed when changing the criterion, which got fixed after removing the 'IsConverged' call

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good that it now appears in the test.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just as a reminder: I would propose to add a small comment to this json file which explains why there is one deviating "convergence_criterion" (just for our future selfs ;-))

@rfaasse rfaasse added the GeoMechanics Issues related to the GeoMechanicsApplication label Dec 4, 2023
@rfaasse rfaasse self-assigned this Dec 4, 2023
@rfaasse rfaasse marked this pull request as ready for review December 4, 2023 11:56
@rfaasse rfaasse requested review from WPK4FEM and avdg81 December 4, 2023 11:56
@rfaasse rfaasse enabled auto-merge (squash) December 5, 2023 10:10
Copy link
Contributor

@avdg81 avdg81 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for fixing the issue and for improving the code layout with clang-format. Well done!

@@ -39,7 +39,7 @@
"rayleigh_m": 0.0,
"rayleigh_k": 0.0,
"strategy_type": "newton_raphson",
"convergence_criterion": "displacement_criterion",
"convergence_criterion": "residual_criterion",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just as a reminder: I would propose to add a small comment to this json file which explains why there is one deviating "convergence_criterion" (just for our future selfs ;-))

@rfaasse rfaasse merged commit 45ff863 into master Dec 5, 2023
17 checks passed
@rfaasse rfaasse deleted the geo/11869-fix-settlement-differences-in-results-for-cauchy_stress branch December 5, 2023 10:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
GeoMechanics Issues related to the GeoMechanicsApplication
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[GeoMechanicsApplication] Fix differences in results for CAUCHY_STRESS between python/C++ route settlement
4 participants