mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-12-28 03:37:59 +00:00
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:
@ -304,7 +304,13 @@ void printAllSets(const polyMesh& mesh, Ostream& os)
|
||||
IOobjectList objects
|
||||
(
|
||||
mesh,
|
||||
mesh.pointsInstance(),
|
||||
mesh.time().findInstance
|
||||
(
|
||||
polyMesh::meshSubDir/"sets",
|
||||
word::null,
|
||||
IOobject::READ_IF_PRESENT,
|
||||
mesh.facesInstance()
|
||||
),
|
||||
polyMesh::meshSubDir/"sets"
|
||||
);
|
||||
IOobjectList cellSets(objects.lookupClass(cellSet::typeName));
|
||||
@ -417,7 +423,13 @@ void removeSet
|
||||
IOobjectList objects
|
||||
(
|
||||
mesh,
|
||||
mesh.pointsInstance(),
|
||||
mesh.time().findInstance
|
||||
(
|
||||
polyMesh::meshSubDir/"sets",
|
||||
word::null,
|
||||
IOobject::READ_IF_PRESENT,
|
||||
mesh.facesInstance()
|
||||
),
|
||||
polyMesh::meshSubDir/"sets"
|
||||
);
|
||||
|
||||
|
||||
@ -81,14 +81,17 @@ int main(int argc, char *argv[])
|
||||
# include "createNamedPolyMesh.H"
|
||||
|
||||
// Search for list of objects for the time of the mesh
|
||||
IOobjectList objects
|
||||
word setsInstance = runTime.findInstance
|
||||
(
|
||||
mesh,
|
||||
mesh.pointsInstance(),
|
||||
polyMesh::meshSubDir/"sets"
|
||||
polyMesh::meshSubDir/"sets",
|
||||
word::null,
|
||||
IOobject::MUST_READ,
|
||||
mesh.facesInstance()
|
||||
);
|
||||
|
||||
Info<< "Searched : " << mesh.pointsInstance()/polyMesh::meshSubDir/"sets"
|
||||
IOobjectList objects(mesh, setsInstance, polyMesh::meshSubDir/"sets");
|
||||
|
||||
Info<< "Searched : " << setsInstance/polyMesh::meshSubDir/"sets"
|
||||
<< nl
|
||||
<< "Found : " << objects.names() << nl
|
||||
<< endl;
|
||||
|
||||
Reference in New Issue
Block a user