diff --git a/src/dynamicMesh/motionSmoother/motionSmootherAlgo.C b/src/dynamicMesh/motionSmoother/motionSmootherAlgo.C index d546ff86bb..dbef33a6ad 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(), + 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 724658012e..4cc17efdcd 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.