diff --git a/src/dynamicMesh/motionSmoother/motionSmootherAlgo.C b/src/dynamicMesh/motionSmoother/motionSmootherAlgo.C index d546ff86bb7c5fc347575f8e76220fbf8a45fb99..dbef33a6adfd84465c69fffac763f3c5b64d9765 100644 --- a/src/dynamicMesh/motionSmoother/motionSmootherAlgo.C +++ b/src/dynamicMesh/motionSmoother/motionSmootherAlgo.C @@ -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) diff --git a/src/dynamicMesh/motionSmoother/motionSmootherAlgo.H b/src/dynamicMesh/motionSmoother/motionSmootherAlgo.H index 724658012e8cb45e43617c4fdf2b9e8778d12f27..4cc17efdcd2ea67eb1fa064f928ecc0b14e6319a 100644 --- a/src/dynamicMesh/motionSmoother/motionSmootherAlgo.H +++ b/src/dynamicMesh/motionSmoother/motionSmootherAlgo.H @@ -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.