Forward compatibility: flex
[foam-extend-3.2.git] / applications / utilities / postProcessing / dataConversion / foamToFieldview9 / getFieldNames.H
blobec540efe7df467f5ce5136303309ce71eb3b602e
1 HashSet<word> volScalarHash;
2 HashSet<word> volVectorHash;
3 HashSet<word> surfScalarHash;
4 HashSet<word> surfVectorHash;
5 HashSet<word> sprayScalarHash;
6 HashSet<word> sprayVectorHash;
8 forAll(timeDirs, timeI)
10     runTime.setTime(timeDirs[timeI], timeI);
12     // Add all fields to hashtable
13     IOobjectList objects(mesh, runTime.timeName());
14     {
15         wordList fieldNames(objects.names(volScalarField::typeName));
16         forAll(fieldNames, fieldI)
17         {
18             volScalarHash.insert(fieldNames[fieldI]);
19         }
20     }
21     {
22         wordList fieldNames(objects.names(volVectorField::typeName));
23         forAll(fieldNames, fieldI)
24         {
25             volVectorHash.insert(fieldNames[fieldI]);
26         }
27     }
28     {
29         wordList fieldNames(objects.names(surfaceScalarField::typeName));
30         forAll(fieldNames, fieldI)
31         {
32             surfScalarHash.insert(fieldNames[fieldI]);
33         }
34     }
35     {
36         wordList fieldNames(objects.names(surfaceVectorField::typeName));
37         forAll(fieldNames, fieldI)
38         {
39             surfVectorHash.insert(fieldNames[fieldI]);
40         }
41     }
44     // Same for spray
45     IOobjectList sprayObjects(mesh, runTime.timeName(), cloud::prefix);
46     {
47         wordList fieldNames(sprayObjects.names(scalarIOField::typeName));
48         forAll(fieldNames, fieldI)
49         {
50             sprayScalarHash.insert(fieldNames[fieldI]);
51         }
52     }
53     {
54         wordList fieldNames(sprayObjects.names(vectorIOField::typeName));
55         forAll(fieldNames, fieldI)
56         {
57             sprayVectorHash.insert(fieldNames[fieldI]);
58         }
59     }
63 wordList volScalarNames(volScalarHash.toc());
64 wordList volVectorNames(volVectorHash.toc());
65 wordList surfScalarNames(surfScalarHash.toc());
66 wordList surfVectorNames(surfVectorHash.toc());
67 wordList sprayScalarNames(sprayScalarHash.toc());
68 wordList sprayVectorNames(sprayVectorHash.toc());