[GeoMechanicsApplication] Added a class that represents sigma and tau#14172
Merged
[GeoMechanicsApplication] Added a class that represents sigma and tau#14172
Conversation
…ializer list with size unequal to 2
Use GTest's `TEST_F` rather than `KRATOS_TEST_CASE_IN_SUITE`, and a different header file to improve compilation speed.
…less than 2 To have excess (an) element(s) is okay.
rfaasse
previously approved these changes
Feb 3, 2026
Contributor
rfaasse
left a comment
There was a problem hiding this comment.
I don't have any blocking comments (only minor suggestions). Looks good to go!
applications/GeoMechanicsApplication/custom_constitutive/geo_sigma_tau.cpp
Outdated
Show resolved
Hide resolved
applications/GeoMechanicsApplication/tests/cpp_tests/custom_constitutive/test_sigma_tau.cpp
Outdated
Show resolved
Hide resolved
WPK4FEM
previously approved these changes
Feb 3, 2026
Contributor
WPK4FEM
left a comment
There was a problem hiding this comment.
Dear Anne,
I do not have any major comments. Please teach me more about the unit testing.
Wijtze Pieter
applications/GeoMechanicsApplication/custom_constitutive/geo_sigma_tau.cpp
Outdated
Show resolved
Hide resolved
applications/GeoMechanicsApplication/custom_constitutive/geo_sigma_tau.hpp
Show resolved
Hide resolved
applications/GeoMechanicsApplication/custom_constitutive/geo_sigma_tau.hpp
Show resolved
Hide resolved
applications/GeoMechanicsApplication/tests/cpp_tests/custom_constitutive/test_sigma_tau.cpp
Show resolved
Hide resolved
applications/GeoMechanicsApplication/tests/cpp_tests/custom_constitutive/test_sigma_tau.cpp
Outdated
Show resolved
Hide resolved
WPK4FEM
reviewed
Feb 3, 2026
applications/GeoMechanicsApplication/custom_constitutive/geo_sigma_tau.hpp
Outdated
Show resolved
Hide resolved
- The `initializer_list` constructor won't be called with an empty list. In that case, the default constructor is preferred. Therefore, the `initializer_list` constructor shouldn't check for an empty list. - Removed an accidentally duplicated line in one of the unit tests.
Marked three member functions `[[nodiscard]]`.
- Construction with an empty initializer list will call the default constructor. Moved the corresponding test code to the appropriate unit test. Also updated the test case name of the moved-from test. - Removed a unit test that I could not get to skip correctly.
Contributor
Author
rfaasse
previously approved these changes
Feb 4, 2026
Contributor
rfaasse
left a comment
There was a problem hiding this comment.
No further comments, ready to go!
| } | ||
|
|
||
| private: | ||
| template <typename InputIt> |
Contributor
There was a problem hiding this comment.
Nice way of still sharing the implementation for initializer lists and vectors/Vectors!
This should resolve an issue found by SonarQube.
Contributor
Author
|
Used the concept of a forward iterator to resolve an issue found by SonarQube. |
WPK4FEM
approved these changes
Feb 4, 2026
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.
📝 Description$\sigma$ and $\tau$ . With this class, we can be explicit about the intended stress invariant compared to, for instance, a
Added the class
SigmaTauthat representsVectorobject. The class's interface is fairly minimal and has been covered by unit tests.