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.
This commit is contained in:
Henry Weller
2024-04-12 13:43:05 +01:00
parent 5ed8fd320c
commit a4929ccbbc

View File

@ -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,