Merge branch 'master' of ssh://git.code.sf.net/p/foam-extend/foam-extend-3.2
[foam-extend-3.2.git] / applications / utilities / postProcessing / dataConversion / foamToFieldview9 / createSprayFields.H
bloba5a218de804abed8fd523d5241979e4073fc66c4
1 // Construct of ptrs to all spray fields
2 List<IOField<scalar>* > sprayScalarFieldPtrs
4     sprayScalarNames.size(),
5     reinterpret_cast<IOField<scalar>*>(0)
6 );
8 List<IOField<vector>* > sprayVectorFieldPtrs
10     sprayVectorNames.size(),
11     reinterpret_cast<IOField<vector>*>(0)
15      int sprayFieldI = 0;
17     // Set scalar fields
18     forAll(sprayScalarNames, fieldI)
19     {
20         IOobject ioHeader
21         (
22             sprayScalarNames[fieldI],
23             runTime.timeName(),
24             cloud::prefix,
25             mesh,
26             IOobject::MUST_READ,
27             IOobject::NO_WRITE
28         );
30         if (ioHeader.headerOk())
31         {
32             sprayScalarFieldPtrs[sprayFieldI] = new IOField<scalar>(ioHeader);
33         }
34         else
35         {
36             Info<< "    dummy lagrangian field for "
37                 << sprayScalarNames[fieldI] << endl;
38         }
40         sprayFieldI++;
41     }
45 // Set vector fields
48     int sprayFieldI = 0;
50     forAll(sprayVectorNames, fieldI)
51     {
52         IOobject ioHeader
53         (
54             sprayVectorNames[fieldI],
55             runTime.timeName(),
56             cloud::prefix,
57             mesh,
58             IOobject::MUST_READ,
59             IOobject::NO_WRITE
60         );
62         if (ioHeader.headerOk())
63         {
64             sprayVectorFieldPtrs[sprayFieldI] = new IOField<vector>(ioHeader);
65         }
66         else
67         {
68             Info<< "    dummy lagrangian field for "
69                 << sprayVectorNames[fieldI] << endl;
70         }
72         sprayFieldI++;
73     }