Files
openfoam/applications/utilities/postProcessing/dataConversion/foamToFieldview9/getFieldNames.H
Mark Olesen b968e62ef9 objectRegistry fixes
- objectRegistry gets a rename() that also adjusts the dbDir
- cloud reworked to use static variables subInstance and defaultName.
  This avoids writing "lagrangian" everywhere

string fixes
- avoid masking of std::string::replace in string.H
- avoid old strstream in PV3FoamReader
2009-03-06 15:18:00 +01:00

69 lines
1.9 KiB
C

HashSet<word> volScalarHash;
HashSet<word> volVectorHash;
HashSet<word> surfScalarHash;
HashSet<word> surfVectorHash;
HashSet<word> sprayScalarHash;
HashSet<word> sprayVectorHash;
forAll(Times, timeI)
{
runTime.setTime(Times[timeI], timeI);
// Add all fields to hashtable
IOobjectList objects(mesh, runTime.timeName());
{
wordList fieldNames(objects.names(volScalarField::typeName));
forAll(fieldNames, fieldI)
{
volScalarHash.insert(fieldNames[fieldI]);
}
}
{
wordList fieldNames(objects.names(volVectorField::typeName));
forAll(fieldNames, fieldI)
{
volVectorHash.insert(fieldNames[fieldI]);
}
}
{
wordList fieldNames(objects.names(surfaceScalarField::typeName));
forAll(fieldNames, fieldI)
{
surfScalarHash.insert(fieldNames[fieldI]);
}
}
{
wordList fieldNames(objects.names(surfaceVectorField::typeName));
forAll(fieldNames, fieldI)
{
surfVectorHash.insert(fieldNames[fieldI]);
}
}
// Same for spray
IOobjectList sprayObjects(mesh, runTime.timeName(), cloud::subInstance);
{
wordList fieldNames(sprayObjects.names(scalarIOField::typeName));
forAll(fieldNames, fieldI)
{
sprayScalarHash.insert(fieldNames[fieldI]);
}
}
{
wordList fieldNames(sprayObjects.names(vectorIOField::typeName));
forAll(fieldNames, fieldI)
{
sprayVectorHash.insert(fieldNames[fieldI]);
}
}
}
wordList volScalarNames(volScalarHash.toc());
wordList volVectorNames(volVectorHash.toc());
wordList surfScalarNames(surfScalarHash.toc());
wordList surfVectorNames(surfVectorHash.toc());
wordList sprayScalarNames(sprayScalarHash.toc());
wordList sprayVectorNames(sprayVectorHash.toc());