polyMesh::reorderPatches: Update time instance for the mesh

so that the mesh with the changed boundary is written into a new time directory
if time has changed.
This commit is contained in:
Henry Weller
2024-04-16 15:11:14 +01:00
parent 615d72a17d
commit 30a25219d7

View File

@ -1188,10 +1188,12 @@ void Foam::polyMesh::reorderPatches
const bool validBoundary
)
{
// Clear local fields and e.g. polyMesh parallelInfo. Do not clearGeom
// so we keep RepatchableMeshObjects intact.
// Clear local fields and e.g. polyMesh parallelInfo.
// Do not clearGeom to keep RepatchableMeshObjects intact.
boundary_.clearGeom();
clearAddressing(true);
// Clear all but RepatchableMeshObjects
meshObjects::clearUpto
<
@ -1212,6 +1214,11 @@ void Foam::polyMesh::reorderPatches
*this
);
// Update time instance for the mesh
// so that it writes the mesh with the changed boundary
// into a new time directory
setInstance(time().name());
boundary_.reorderPatches(newToOld, validBoundary);
// Warn mesh objects