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
|
// 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();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -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;
|
||||||
|
|||||||
Reference in New Issue
Block a user