ENH: reconstructParMesh: handle times without meshes

This commit is contained in:
mattijs
2014-01-09 10:20:26 +00:00
parent 515a4ee23d
commit e7156dbec0

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -578,7 +578,7 @@ int main(int argc, char *argv[])
// Loop over all times // Loop over all times
forAll(Times, timeI) for (label timeI = startTime; timeI < endTime; timeI++)
{ {
// Set time for global database // Set time for global database
runTime.setTime(Times[timeI], timeI); runTime.setTime(Times[timeI], timeI);
@ -591,6 +591,19 @@ int main(int argc, char *argv[])
databases[procI].setTime(Times[timeI], timeI); databases[procI].setTime(Times[timeI], timeI);
} }
const fileName meshPath =
databases[0].path()
/databases[0].timeName()
/regionDir
/polyMesh::meshSubDir;
if (!isFile(meshPath/"faces"))
{
Info<< "No mesh." << nl << endl;
continue;
}
// Read point on individual processors to determine merge tolerance // Read point on individual processors to determine merge tolerance
// (otherwise single cell domains might give problems) // (otherwise single cell domains might give problems)