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:
Mark Olesen
2016-11-21 14:28:40 +01:00
parent c554dc7b7d
commit 784461b2fa
9 changed files with 57 additions and 50 deletions

View File

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