diff --git a/src/OpenFOAM/meshes/polyMesh/polyBoundaryMesh/polyBoundaryMesh.C b/src/OpenFOAM/meshes/polyMesh/polyBoundaryMesh/polyBoundaryMesh.C index a54438f105..b4148405cf 100644 --- a/src/OpenFOAM/meshes/polyMesh/polyBoundaryMesh/polyBoundaryMesh.C +++ b/src/OpenFOAM/meshes/polyMesh/polyBoundaryMesh/polyBoundaryMesh.C @@ -1078,7 +1078,11 @@ void Foam::polyBoundaryMesh::updateMesh() } -void Foam::polyBoundaryMesh::reorder(const labelUList& oldToNew) +void Foam::polyBoundaryMesh::reorder +( + const labelUList& oldToNew, + const bool validBoundary +) { // Change order of patches polyPatchList::reorder(oldToNew); @@ -1091,7 +1095,10 @@ void Foam::polyBoundaryMesh::reorder(const labelUList& oldToNew) patches[patchI].index() = patchI; } - updateMesh(); + if (validBoundary) + { + updateMesh(); + } } diff --git a/src/OpenFOAM/meshes/polyMesh/polyBoundaryMesh/polyBoundaryMesh.H b/src/OpenFOAM/meshes/polyMesh/polyBoundaryMesh/polyBoundaryMesh.H index 34f0a6d409..ad937a86fd 100644 --- a/src/OpenFOAM/meshes/polyMesh/polyBoundaryMesh/polyBoundaryMesh.H +++ b/src/OpenFOAM/meshes/polyMesh/polyBoundaryMesh/polyBoundaryMesh.H @@ -219,9 +219,10 @@ public: //- Reorders patches. Ordering does not have to be done in // ascending or descending order. Reordering has to be unique. - // (is shuffle) Calls updateMesh() after reordering to recalculate - // data. - void reorder(const labelUList&); + // (is shuffle) If validBoundary calls updateMesh() + // after reordering to recalculate data (so call needs to be parallel + // sync in that case) + void reorder(const labelUList&, const bool validBoundary); //- writeData member function required by regIOobject bool writeData(Ostream&) const;