-
Notifications
You must be signed in to change notification settings - Fork 248
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] Add a time incrementor that models a collection of prescribed time increments #11662
Conversation
Whenever a time step has finished and its result has been processed, we advance the iterator. In this way, when we have a list of N time increments and we process N time step results, the next query whether a next step must be carried out will yield false. Also removed two empty statements.
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.
Looks very clear and complete! Nice to see TDD happening more and more 😄
Just flagged a a couple of missing 'consts' but nothing major.
applications/GeoMechanicsApplication/tests/cpp_tests/test_prescribed_time_incrementor.cpp
Outdated
Show resolved
Hide resolved
applications/GeoMechanicsApplication/custom_workflows/prescribed_time_incrementor.cpp
Show resolved
Hide resolved
- Ensure that a returned value is assigned to a variable when the function is marked `[[nodiscard]]`. - Removed two empty statements.
The unused variable was added to suppress a warning due to the `[[nodiscard]]` attribute of a member function. To avoid another warning due to the unused variable, the dummy variable has now been decorated with the `[[maybe_unused]]` attribute.
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.
Looks good to me!
📝 Description
Added a time incrementor that implements the time incrementor interface for the case where we have a collection of prescribed time increments. This class is probably one of the simplest (and most fundamental) ways to step through time. We will use it when developing the time loop executor. (But we may consider to also make it accessible through the
ProjectParameters.json
file.)