mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
BUG: motionSmoother: knock out displacement on points coupled to patch points
Before was zeroing displacement on all coupled points before applying the displacement. This meant that we could not modify the internal displacement on coupled points before setting the patch displacement. Fixes #10.
This commit is contained in:
@ -514,12 +514,31 @@ void Foam::motionSmootherAlgo::setDisplacement
|
||||
const labelList& cppMeshPoints =
|
||||
mesh.globalData().coupledPatch().meshPoints();
|
||||
|
||||
forAll(cppMeshPoints, i)
|
||||
const labelList& ppMeshPoints = pp.meshPoints();
|
||||
|
||||
// Knock out displacement on points which are not on pp but are coupled
|
||||
// to them since we want 'proper' values from displacement to take
|
||||
// precedence.
|
||||
{
|
||||
displacement[cppMeshPoints[i]] = vector::zero;
|
||||
PackedBoolList isPatchPoint(mesh.nPoints());
|
||||
isPatchPoint.set(ppMeshPoints);
|
||||
syncTools::syncPointList
|
||||
(
|
||||
mesh,
|
||||
isPatchPoint,
|
||||
maxEqOp<unsigned int>(),
|
||||
0
|
||||
);
|
||||
forAll(cppMeshPoints, i)
|
||||
{
|
||||
label pointI = cppMeshPoints[i];
|
||||
if (isPatchPoint[pointI])
|
||||
{
|
||||
displacement[pointI] = vector::zero;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const labelList& ppMeshPoints = pp.meshPoints();
|
||||
|
||||
// Set internal point data from displacement on combined patch points.
|
||||
forAll(ppMeshPoints, patchPointI)
|
||||
|
||||
@ -56,7 +56,8 @@ Note
|
||||
and/or edges but no faces of pp). Hence we have to be careful when e.g.
|
||||
synchronising displacements that the value from the processor which has
|
||||
faces of pp get priority. This is currently handled in setDisplacement
|
||||
by resetting the internal displacement to zero before doing anything
|
||||
by resetting the internal displacement to zero on coupled points
|
||||
that are coupled to patch points before doing anything
|
||||
else. The combine operator used will give preference to non-zero
|
||||
values.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user