Skip to content

[GeomechanicsApplication] added process to calculate total motion#13585

Merged
aronnoordam merged 11 commits intomasterfrom
geo/move_calc_total_disp_to_cpp
Jul 7, 2025
Merged

[GeomechanicsApplication] added process to calculate total motion#13585
aronnoordam merged 11 commits intomasterfrom
geo/move_calc_total_disp_to_cpp

Conversation

@aronnoordam
Copy link
Member

@aronnoordam aronnoordam commented Jul 2, 2025

added process to calculate TOTAL motion, where motion is either DISPLACEMENT or ROTATION

also fixed a unrelated test which suddenly failed for some reason

@aronnoordam aronnoordam added the GeoMechanics Issues related to the GeoMechanicsApplication label Jul 2, 2025
@aronnoordam aronnoordam changed the title added process to calculate total motion [GeomechanicsApplication] added process to calculate total motion Jul 2, 2025
@aronnoordam aronnoordam marked this pull request as ready for review July 3, 2025 12:35
@aronnoordam aronnoordam requested a review from a team as a code owner July 3, 2025 12:35
@WPK4FEM WPK4FEM linked an issue Jul 3, 2025 that may be closed by this pull request
5 tasks
Copy link
Contributor

@rfaasse rfaasse left a comment

Choose a reason for hiding this comment

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

Clear and well-tested PR! I only have some suggestions for simplification.

Comment on lines -98 to -111
void AccumulateTotalDisplacementField() override
{
for (auto& node : mrModelPart.Nodes()) {
node.GetSolutionStepValue(TOTAL_DISPLACEMENT) += node.GetSolutionStepValue(INCREMENTAL_DISPLACEMENT);
}
}

void ComputeIncrementalDisplacementField() override
{
for (auto& node : mrModelPart.Nodes()) {
node.GetSolutionStepValue(INCREMENTAL_DISPLACEMENT) =
node.GetSolutionStepValue(DISPLACEMENT, 0) - node.GetSolutionStepValue(DISPLACEMENT, 1);
}
}
Copy link
Contributor

Choose a reason for hiding this comment

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

I think it'd be a good idea to keep these functions and use the processes here. Then we also don't need to expose the ModelPart&. That also simplifies this PR quite a bit, because we don't need part of the changes.

Copy link
Contributor

@rfaasse rfaasse 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 processing the review comments, this is good to go!

@aronnoordam aronnoordam merged commit b8d0bcd into master Jul 7, 2025
11 checks passed
@aronnoordam aronnoordam deleted the geo/move_calc_total_disp_to_cpp branch July 7, 2025 07:42
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] Calculate total_displacement in C++ instead of python

2 participants