1 // Construct List of pointers to all vol fields
2 int nFields = volScalarNames.size() + 3*volVectorNames.size();
3 List<volScalarField*> volFieldPtrs
6 reinterpret_cast<volScalarField*>(NULL)
9 stringList volFieldNames(nFields);
13 // Load all scalar fields and store ptr to it
14 forAll(volScalarNames, fieldI)
16 word fieldName = volScalarNames[fieldI];
28 if (ioHeader.headerOk())
30 volFieldPtrs[nFields] =
38 fieldName = getFieldViewName(fieldName);
40 volFieldNames[nFields] = fieldName;
46 // Load all (componenents of) vector fields
47 forAll(volVectorNames, fieldI)
49 word fieldName = volVectorNames[fieldI];
61 if (ioHeader.headerOk())
63 volVectorField vvf(ioHeader, mesh);
66 volFieldPtrs[nFields] =
69 vvf.component(vector::X)
73 volFieldPtrs[nFields+1] =
76 vvf.component(vector::Y)
80 volFieldPtrs[nFields+2] =
83 vvf.component(vector::Z)
87 fieldName = getFieldViewName(fieldName);
89 volFieldNames[nFields] = fieldName + ("x;" + fieldName);
90 volFieldNames[nFields+1] = fieldName + "y";
91 volFieldNames[nFields+2] = fieldName + "z";
100 // Construct List of pointers to all surface fields
105 int nSurfFields = surfScalarNames.size() + 3*surfVectorNames.size();
106 List<surfaceScalarField*> surfFieldPtrs
109 reinterpret_cast<surfaceScalarField*>(NULL)
112 stringList surfFieldNames(nSurfFields);
116 // Load all scalar fields
117 forAll(surfScalarNames, fieldI)
119 word fieldName = surfScalarNames[fieldI];
131 if (ioHeader.headerOk())
133 surfFieldPtrs[nSurfFields] =
134 new surfaceScalarField
141 fieldName = getFieldViewName(fieldName);
143 surfFieldNames[nSurfFields] = fieldName;
149 // Set (componenents of) vector fields
150 forAll(surfVectorNames, fieldI)
152 word fieldName = surfVectorNames[fieldI];
164 if (ioHeader.headerOk())
166 surfaceVectorField svf(ioHeader, mesh);
169 surfFieldPtrs[nSurfFields] =
170 new surfaceScalarField
172 svf.component(vector::X)
176 surfFieldPtrs[nSurfFields+1] =
177 new surfaceScalarField
179 svf.component(vector::Y)
183 surfFieldPtrs[nSurfFields+2] =
184 new surfaceScalarField
186 svf.component(vector::Z)
190 fieldName = getFieldViewName(fieldName);
192 surfFieldNames[nSurfFields] = fieldName + ("x;" + fieldName);
193 surfFieldNames[nSurfFields+1] = fieldName + "y";
194 surfFieldNames[nSurfFields+2] = fieldName + "z";