ENH: sets are now searched for.

Some tools now output sets at the pointsInstance (if relating to geometry),
some at the facesInstance (if relating to topology).
So when loading them we now search for them from current time down
to facesInstance. They cannot be beyond facesInstance.
Adapted Time::findInstance to take optional limiting instance. Adapted
topoSet to use this. Adapted all uses of IOobjectList on sets to do the
same.
This commit is contained in:
mattijs
2010-01-29 10:25:13 +00:00
parent e931525a0f
commit 8b7f6666ca
14 changed files with 182 additions and 54 deletions

View File

@ -400,25 +400,30 @@ void Foam::vtkPV3Foam::updateInfoSets
Info<< "<beg> Foam::vtkPV3Foam::updateInfoSets" << endl;
}
// Add names of sets
IOobjectList objects
// Add names of sets. Search for last time directory with a sets
// subdirectory. Take care not to search beyond the last mesh.
word facesInstance = dbPtr_().findInstance
(
dbPtr_(),
dbPtr_().findInstance(meshDir_, "faces", IOobject::READ_IF_PRESENT),
meshDir_/"sets"
meshDir_,
"faces",
IOobject::READ_IF_PRESENT
);
word setsInstance = dbPtr_().findInstance
(
meshDir_/"sets",
word::null,
IOobject::READ_IF_PRESENT,
facesInstance
);
IOobjectList objects(dbPtr_(), setsInstance, meshDir_/"sets");
if (debug)
{
Info<< " Foam::vtkPV3Foam::updateInfoSets read "
<< objects.names() << " from "
<< dbPtr_().findInstance
(
meshDir_,
"faces",
IOobject::READ_IF_PRESENT
)
<< endl;
<< objects.names() << " from " << setsInstance << endl;
}