mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: polyBoundaryMesh: allow reordering without parallel sync
This commit is contained in:
@ -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,8 +1095,11 @@ void Foam::polyBoundaryMesh::reorder(const labelUList& oldToNew)
|
||||
patches[patchI].index() = patchI;
|
||||
}
|
||||
|
||||
if (validBoundary)
|
||||
{
|
||||
updateMesh();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
bool Foam::polyBoundaryMesh::writeData(Ostream& os) const
|
||||
|
||||
@ -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;
|
||||
|
||||
Reference in New Issue
Block a user