diff --git a/src/dynamicMesh/motionSmoother/motionSmootherAlgo.C b/src/dynamicMesh/motionSmoother/motionSmootherAlgo.C index b6c1bd183c..a953c66ea6 100644 --- a/src/dynamicMesh/motionSmoother/motionSmootherAlgo.C +++ b/src/dynamicMesh/motionSmoother/motionSmootherAlgo.C @@ -169,7 +169,7 @@ void Foam::motionSmootherAlgo::minSmooth } // Single and multi-patch constraints - pointConstraints::New(newFld.mesh()).constrain(newFld, false); + pointConstraints::New(mesh()).constrain(newFld, false); } @@ -202,7 +202,7 @@ void Foam::motionSmootherAlgo::minSmooth } // Single and multi-patch constraints - pointConstraints::New(newFld.mesh()).constrain(newFld, false); + pointConstraints::New(mesh()).constrain(newFld, false); } @@ -224,7 +224,7 @@ void Foam::motionSmootherAlgo::scaleField } // Single and multi-patch constraints - pointConstraints::New(fld.mesh()).constrain(fld, false); + pointConstraints::New(mesh()).constrain(fld, false); } @@ -266,7 +266,7 @@ void Foam::motionSmootherAlgo::subtractField } // Single and multi-patch constraints - pointConstraints::New(fld.mesh()).constrain(fld); + pointConstraints::New(mesh()).constrain(fld); } @@ -476,7 +476,7 @@ void Foam::motionSmootherAlgo::setDisplacementPatchFields } // Multi-patch constraints - pointConstraints::New(displacement.mesh()).constrainCorners(displacement); + pointConstraints::New(displacement.mesh()()).constrainCorners(displacement); // Adapt the fixedValue bc's (i.e. copy internal point data to // boundaryField for all affected patches) to take the changes caused @@ -622,7 +622,7 @@ void Foam::motionSmootherAlgo::correctBoundaryConditions } // Multi-patch constraints - pointConstraints::New(displacement.mesh()).constrainCorners(displacement); + pointConstraints::New(displacement.mesh()()).constrainCorners(displacement); // Correct for problems introduced by corner constraints syncTools::syncPointList diff --git a/src/dynamicMesh/motionSmoother/motionSmootherAlgoTemplates.C b/src/dynamicMesh/motionSmoother/motionSmootherAlgoTemplates.C index fa847ff328..f78a11a9a3 100644 --- a/src/dynamicMesh/motionSmoother/motionSmootherAlgoTemplates.C +++ b/src/dynamicMesh/motionSmoother/motionSmootherAlgoTemplates.C @@ -229,7 +229,7 @@ Foam::motionSmootherAlgo::avg } // Single and multi-patch constraints - pointConstraints::New(res.mesh()).constrain(res, false); + pointConstraints::New(mesh).constrain(res, false); return tres; } @@ -256,7 +256,7 @@ void Foam::motionSmootherAlgo::smooth } // Single and multi-patch constraints - pointConstraints::New(newFld.mesh()).constrain(newFld, false); + pointConstraints::New(mesh_).constrain(newFld, false); } diff --git a/src/finiteVolume/interpolation/volPointInterpolation/pointConstraints.C b/src/finiteVolume/interpolation/volPointInterpolation/pointConstraints.C index bb370fffb8..5bc4d56e94 100644 --- a/src/finiteVolume/interpolation/volPointInterpolation/pointConstraints.C +++ b/src/finiteVolume/interpolation/volPointInterpolation/pointConstraints.C @@ -51,11 +51,11 @@ void pointConstraints::makePatchPatchAddressing() << endl; } - const pointMesh& pMesh = mesh(); - const polyMesh& mesh = pMesh(); + //const polyMesh& mesh = mesh(); + const pointMesh& pMesh = pointMesh::New(mesh()); const pointBoundaryMesh& pbm = pMesh.boundary(); - const polyBoundaryMesh& bm = mesh.boundaryMesh(); + const polyBoundaryMesh& bm = mesh().boundaryMesh(); // first count the total number of patch-patch points @@ -146,7 +146,7 @@ void pointConstraints::makePatchPatchAddressing() // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { - const globalMeshData& gd = mesh.globalData(); + const globalMeshData& gd = mesh().globalData(); const labelListList& globalPointSlaves = gd.globalPointSlaves(); const mapDistribute& globalPointSlavesMap = gd.globalPointSlavesMap(); const Map