-
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] Geo/time step loop #11677
Conversation
…ormedStatesAfterRunning. Removed template argument from TimeLoopExecutor class.
…dded test for running and terminating a loop with a non-converging solver strategy.
…of the time passed. Added a test on end time after N steps.
…ed ). Passed solver strategy to time step executor.
…crementor with a fixed number of cycles per step. Added RunCycle and RunCycleLoop to the time loop executor.
Also added the `explicit` keyword to a single-argument constructor.
Given a prescribed time incrementor that keeps four time increments and a solver strategy that always converges, we expect to get four converged time step end states, where each one just required a single cycle. Also the time values are validated for each time step end state. Furthermore added a helper function to build a converged end state.
Now that the strategy wrapper is a member of the time loop executor, we can set the end time and the time increment in their "global" variables. Internally, this is done via the model part. The reason we set these variables explicitly is that processes may rely on having this information available.
Extended the API of class `StrategyWrapper` such that we can increment the step number and get the step number upon request.
…rapper needed for the time loop executor.
…for restoring to the initial situation of a step to enable cycling of the step.
…entField implemented and unit tests provided.
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.
Very nice readable and clean code (and of course well-tested)!
I think there is the possibility for some more clean-up of the tests and there are some discussion points about the structure.
applications/GeoMechanicsApplication/custom_workflows/custom_workflow_factory.cpp
Show resolved
Hide resolved
applications/GeoMechanicsApplication/custom_workflows/time_loop_executor.hpp
Outdated
Show resolved
Hide resolved
applications/GeoMechanicsApplication/custom_workflows/time_loop_executor.hpp
Outdated
Show resolved
Hide resolved
applications/GeoMechanicsApplication/tests/cpp_tests/test_time_loop_executor.cpp
Outdated
Show resolved
Hide resolved
applications/GeoMechanicsApplication/tests/cpp_tests/stub_time_loop_executor.h
Outdated
Show resolved
Hide resolved
applications/GeoMechanicsApplication/custom_workflows/time_loop_executor.h
Show resolved
Hide resolved
applications/GeoMechanicsApplication/tests/cpp_tests/test_time_loop_executor.cpp
Outdated
Show resolved
Hide resolved
applications/GeoMechanicsApplication/tests/cpp_tests/test_time_loop_executor.cpp
Outdated
Show resolved
Hide resolved
applications/GeoMechanicsApplication/custom_workflows/time_loop_executor.hpp
Outdated
Show resolved
Hide resolved
…anges a test for the TimeStepExecutor and there is a new one for the TimeLoopExecutor.
|
||
class Process; | ||
|
||
class TimeLoopExecutorInterface{ |
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.
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, I don't have a better suggestion either. Let's keep the class names as they are now.
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.
Clear and clean code. Good job! I have several comments, most of which are very minor.
applications/GeoMechanicsApplication/custom_workflows/dgeosettlement.cpp
Outdated
Show resolved
Hide resolved
applications/GeoMechanicsApplication/custom_workflows/time_loop_executor.hpp
Outdated
Show resolved
Hide resolved
applications/GeoMechanicsApplication/custom_workflows/time_loop_executor.hpp
Outdated
Show resolved
Hide resolved
applications/GeoMechanicsApplication/custom_workflows/time_loop_executor.hpp
Outdated
Show resolved
Hide resolved
|
||
class Process; | ||
|
||
class TimeLoopExecutorInterface{ |
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, I don't have a better suggestion either. Let's keep the class names as they are now.
applications/GeoMechanicsApplication/tests/cpp_tests/test_time_loop_executor.cpp
Outdated
Show resolved
Hide resolved
applications/GeoMechanicsApplication/tests/cpp_tests/test_time_loop_executor.cpp
Outdated
Show resolved
Hide resolved
applications/GeoMechanicsApplication/tests/cpp_tests/test_time_loop_executor.cpp
Outdated
Show resolved
Hide resolved
applications/GeoMechanicsApplication/tests/cpp_tests/test_time_loop_executor.cpp
Outdated
Show resolved
Hide resolved
applications/GeoMechanicsApplication/tests/cpp_tests/test_time_loop_executor.cpp
Show resolved
Hide resolved
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.
Thanks for implementing the changes and the collaboration on this one! It turned out nicely, so from my side, it's ready to be merged
TIme loop executor that performs the stepping loop and for each step the cycle loop using TimeStepExecutor and StrategyWrapper..
Contains: