mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: make search of instances in IOobject::typeHeaderOk optional (issue #245)
- in specific cases it can be useful to suppress searching the instances. For example, if one only wishes to check if a "points" is available at the given time instance, without searching backwards through all times.
This commit is contained in:
@ -7,8 +7,6 @@ if (timeDirs.size() > 1 && Pstream::master())
|
||||
// We already loaded a mesh (usually from constant).
|
||||
// See if any other "polyMesh/points" files exist too.
|
||||
|
||||
const fileName& baseDir = mesh.time().path();
|
||||
|
||||
Info<< "Search for moving mesh ... " << flush;
|
||||
forAll(timeDirs, timeI)
|
||||
{
|
||||
@ -17,7 +15,6 @@ if (timeDirs.size() > 1 && Pstream::master())
|
||||
meshMoving =
|
||||
(
|
||||
timeName != mesh.pointsInstance()
|
||||
&& isDir(baseDir/timeName/polyMesh::meshSubDir)
|
||||
&& IOobject
|
||||
(
|
||||
"points",
|
||||
@ -27,7 +24,7 @@ if (timeDirs.size() > 1 && Pstream::master())
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE,
|
||||
false // no register
|
||||
).typeHeaderOk<pointIOField>(true)
|
||||
).typeHeaderOk<pointIOField>(true, false)
|
||||
);
|
||||
|
||||
if (meshMoving)
|
||||
|
||||
Reference in New Issue
Block a user