-
Notifications
You must be signed in to change notification settings - Fork 249
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
[MeshMoving] Fix Race Condition In MoveMesh #11811
Conversation
block_for_each( | ||
rModelPart.Nodes(), | ||
[&rTransform, time](Node& rNode){ | ||
rTransform, | ||
[time](Node& rNode, ParametricAffineTransform& rTLSTransform){ | ||
const array_1d<double,3>& initial_position = rNode.GetInitialPosition(); | ||
noalias(rNode.GetSolutionStepValue(MESH_DISPLACEMENT)) = rTransform.Apply( | ||
noalias(rNode.GetSolutionStepValue(MESH_DISPLACEMENT)) = rTLSTransform.Apply( | ||
initial_position, | ||
time, | ||
rNode.X0(), |
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 is the main change, the rest is style/docs/renaming
// Main Authors: Máté Kelemen | ||
// | ||
|
||
#ifndef KRATOS_MESH_MOVING_LINEAR_TRANSFORMATION_INCLUDED |
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.
pragma once
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.
Overall i am ok with the change, however i see you rename methods so this makes it an API changer.
are u sure those methods are not used by other people?
If that is so (no impact on other people) than just merge...otherwise let's discuss the way forward to minimize impact onto other people
I'm not sure how many people are using it. I originally wrote these ~3 years ago for @mpentek. Maybe he has a better idea of other potential users. |
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 dont think we need the backward compatibility
4841532
Merge queue setting changed
Can we merge? |
go ahead |
Main change
Move the
ParametricAffineTransform
inblock_for_each
from a lambda capture to TLS, because it's not thread-safe. The related discussion is in #11804.Other changes
LinearTransform
was a misnomer (because it also involved a translation) so I renamed it toAffineTransform