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*>(0)
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] = new volScalarField
37 fieldName = getFieldViewName(fieldName);
39 volFieldNames[nFields] = fieldName;
45 // Load all (componenents of) vector fields
46 forAll(volVectorNames, fieldI)
48 word fieldName = volVectorNames[fieldI];
60 if (ioHeader.headerOk())
62 volVectorField vvf(ioHeader, mesh);
65 volFieldPtrs[nFields] =
68 vvf.component(vector::X)
72 volFieldPtrs[nFields+1] =
75 vvf.component(vector::Y)
79 volFieldPtrs[nFields+2] =
82 vvf.component(vector::Z)
86 fieldName = getFieldViewName(fieldName);
88 volFieldNames[nFields] = fieldName + ("x;" + fieldName);
89 volFieldNames[nFields+1] = fieldName + "y";
90 volFieldNames[nFields+2] = fieldName + "z";
99 // Construct List of pointers to all surface fields
104 int nSurfFields = surfScalarNames.size() + 3*surfVectorNames.size();
105 List<surfaceScalarField*> surfFieldPtrs
108 reinterpret_cast<surfaceScalarField*>(0)
111 stringList surfFieldNames(nSurfFields);
115 // Load all scalar fields
116 forAll(surfScalarNames, fieldI)
118 word fieldName = surfScalarNames[fieldI];
130 if (ioHeader.headerOk())
132 surfFieldPtrs[nSurfFields] =
133 new surfaceScalarField
140 fieldName = getFieldViewName(fieldName);
142 surfFieldNames[nSurfFields] = fieldName;
148 // Set (componenents of) vector fields
149 forAll(surfVectorNames, fieldI)
151 word fieldName = surfVectorNames[fieldI];
163 if (ioHeader.headerOk())
165 surfaceVectorField svf(ioHeader, mesh);
168 surfFieldPtrs[nSurfFields] =
169 new surfaceScalarField
171 svf.component(vector::X)
175 surfFieldPtrs[nSurfFields+1] =
176 new surfaceScalarField
178 svf.component(vector::Y)
182 surfFieldPtrs[nSurfFields+2] =
183 new surfaceScalarField
185 svf.component(vector::Z)
189 fieldName = getFieldViewName(fieldName);
191 surfFieldNames[nSurfFields] = fieldName + ("x;" + fieldName);
192 surfFieldNames[nSurfFields+1] = fieldName + "y";
193 surfFieldNames[nSurfFields+2] = fieldName + "z";