From a4929ccbbcf2ec059ced6d9d0f44f1f70a736944 Mon Sep 17 00:00:00 2001 From: Henry Weller Date: Fri, 12 Apr 2024 13:43:05 +0100 Subject: [PATCH] polyMesh: Updated searching for boundary, cells, cellZones, faceZones and pointZones files These files are now searched for starting at the current time and back in time to constant but stopping at the most recent polyMesh directory containing faces, i.e. the most recent topological specification of the mesh. Zones which cannot be found are set empty rather than requiring zone files to be present containing an empty list. --- src/OpenFOAM/meshes/polyMesh/polyMesh.C | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/OpenFOAM/meshes/polyMesh/polyMesh.C b/src/OpenFOAM/meshes/polyMesh/polyMesh.C index 57d7c6169c..a7a802345f 100644 --- a/src/OpenFOAM/meshes/polyMesh/polyMesh.C +++ b/src/OpenFOAM/meshes/polyMesh/polyMesh.C @@ -217,7 +217,7 @@ Foam::polyMesh::polyMesh(const IOobject& io) IOobject ( "boundary", - time().findInstance(meshDir(), "boundary"), + faces_.instance(), meshSubDir, *this, IOobject::MUST_READ, @@ -240,7 +240,8 @@ Foam::polyMesh::polyMesh(const IOobject& io) ( meshDir(), "pointZones", - IOobject::READ_IF_PRESENT + IOobject::READ_IF_PRESENT, + faces_.instance() ), meshSubDir, *this, @@ -258,7 +259,8 @@ Foam::polyMesh::polyMesh(const IOobject& io) ( meshDir(), "faceZones", - IOobject::READ_IF_PRESENT + IOobject::READ_IF_PRESENT, + faces_.instance() ), meshSubDir, *this, @@ -276,7 +278,8 @@ Foam::polyMesh::polyMesh(const IOobject& io) ( meshDir(), "cellZones", - IOobject::READ_IF_PRESENT + IOobject::READ_IF_PRESENT, + faces_.instance() ), meshSubDir, *this, @@ -304,7 +307,7 @@ Foam::polyMesh::polyMesh(const IOobject& io) IOobject ( "cells", - time().findInstance(meshDir(), "cells"), + faces_.instance(), meshSubDir, *this, IOobject::MUST_READ,