-
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] added process to calculate incremental displacement #12474
Conversation
KRATOS_TRY | ||
|
||
block_for_each(mrModelPart.Nodes(), [&](Node& rNode) { | ||
rNode.FastGetSolutionStepValue(INCREMENTAL_DISPLACEMENT) = rNode.FastGetSolutionStepValue(DISPLACEMENT, 0) - rNode.FastGetSolutionStepValue(DISPLACEMENT, 1); |
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.
rNode.FastGetSolutionStepValue(INCREMENTAL_DISPLACEMENT) = rNode.FastGetSolutionStepValue(DISPLACEMENT, 0) - rNode.FastGetSolutionStepValue(DISPLACEMENT, 1); | |
noalias(rNode.FastGetSolutionStepValue(INCREMENTAL_DISPLACEMENT)) = rNode.FastGetSolutionStepValue(DISPLACEMENT, 0) - rNode.FastGetSolutionStepValue(DISPLACEMENT, 1); |
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.
this will also save some time
Check also the |
will do, thanks |
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.
A nice and straightforward change. Well done! In addition to my minor suggestions, may I ask you to add a C++ unit test for this new process, since no tests have been added to cover it? Thank you!
...ions/GeoMechanicsApplication/custom_processes/calculate_incremental_displacement_process.cpp
Show resolved
Hide resolved
...ations/GeoMechanicsApplication/custom_processes/calculate_incremental_displacement_process.h
Outdated
Show resolved
Hide resolved
...ations/GeoMechanicsApplication/custom_processes/calculate_incremental_displacement_process.h
Show resolved
Hide resolved
...ions/GeoMechanicsApplication/custom_processes/calculate_incremental_displacement_process.cpp
Outdated
Show resolved
Hide resolved
...ions/GeoMechanicsApplication/custom_processes/calculate_incremental_displacement_process.cpp
Outdated
Show resolved
Hide resolved
applications/GeoMechanicsApplication/custom_python/add_custom_processes_to_python.cpp
Show resolved
Hide resolved
applications/GeoMechanicsApplication/custom_python/add_custom_processes_to_python.cpp
Outdated
Show resolved
Hide resolved
…lculate_incr_disp_process # Conflicts: # applications/GeoMechanicsApplication/custom_python/add_custom_processes_to_python.cpp
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.
I only have a few very minor comments regarding the unit test. Apart from that, I believe this PR is ready to go. Thanks for the work done @aronnoordam !
.../GeoMechanicsApplication/tests/cpp_tests/test_calculate_incremental_displacement_process.cpp
Outdated
Show resolved
Hide resolved
.../GeoMechanicsApplication/tests/cpp_tests/test_calculate_incremental_displacement_process.cpp
Outdated
Show resolved
Hide resolved
.../GeoMechanicsApplication/tests/cpp_tests/test_calculate_incremental_displacement_process.cpp
Outdated
Show resolved
Hide resolved
Co-authored-by: Anne van de Graaf <[email protected]>
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.
This PR looks ready to go.
moved calculation of incremental displacement from python to cpp as this was a bottleneck