ENH: reduce startup time for ensight conversion (issue #240).

- Less looping when detecting lagrangian clouds and their fields.

- Avoid using Time::setTime() and IOobjectList in tight loops.
  They both kill performance immensely.

ENH: provide a -noLagrangian option to foamToEnsight and foamToEnsightParts
for even more control.
This commit is contained in:
Mark Olesen
2016-09-23 17:45:47 +02:00
parent 3503c872a5
commit 88ca081c8c
6 changed files with 186 additions and 145 deletions

View File

@ -12,14 +12,16 @@ if (timeDirs.size() > 1 && Pstream::master())
Info<< "Search for moving mesh ... " << flush;
forAll(timeDirs, timeI)
{
const word& timeName = timeDirs[timeI].name();
meshMoving =
(
timeDirs[timeI].name() != mesh.pointsInstance()
&& isDir(baseDir/timeDirs[timeI].name()/polyMesh::meshSubDir)
timeName != mesh.pointsInstance()
&& isDir(baseDir/timeName/polyMesh::meshSubDir)
&& IOobject
(
"points",
timeDirs[timeI].name(),
timeName,
polyMesh::meshSubDir,
mesh,
IOobject::NO_READ,