ENH: polyBoundaryMesh: allow reordering without parallel sync

This commit is contained in:
mattijs
2012-11-29 15:43:12 +00:00
parent c93a2a2ac4
commit 9bee3023d1
2 changed files with 13 additions and 5 deletions

View File

@ -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 // Change order of patches
polyPatchList::reorder(oldToNew); polyPatchList::reorder(oldToNew);
@ -1091,7 +1095,10 @@ void Foam::polyBoundaryMesh::reorder(const labelUList& oldToNew)
patches[patchI].index() = patchI; patches[patchI].index() = patchI;
} }
updateMesh(); if (validBoundary)
{
updateMesh();
}
} }

View File

@ -219,9 +219,10 @@ public:
//- Reorders patches. Ordering does not have to be done in //- Reorders patches. Ordering does not have to be done in
// ascending or descending order. Reordering has to be unique. // ascending or descending order. Reordering has to be unique.
// (is shuffle) Calls updateMesh() after reordering to recalculate // (is shuffle) If validBoundary calls updateMesh()
// data. // after reordering to recalculate data (so call needs to be parallel
void reorder(const labelUList&); // sync in that case)
void reorder(const labelUList&, const bool validBoundary);
//- writeData member function required by regIOobject //- writeData member function required by regIOobject
bool writeData(Ostream&) const; bool writeData(Ostream&) const;