MCPcopy Create free account
hub / github.com/OpenFOAM/OpenFOAM-dev / writeVectorField

Function writeVectorField

src/conversion/ensight/part/ensightPartIO.C:249–285  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

247
248
249void Foam::ensightPart::writeVectorField
250(
251 ensightFile& os,
252 const List<scalar>& field0,
253 const List<scalar>& field1,
254 const List<scalar>& field2,
255 const bool perNode
256) const
257{
258 if (size() && field0.size() && (os.allowUndef() || isFieldDefined(field0)))
259 {
260 writeHeader(os);
261
262 if (perNode)
263 {
264 os.writeKeyword("coordinates");
265 writeFieldList(os, field0, labelUList::null());
266 writeFieldList(os, field1, labelUList::null());
267 writeFieldList(os, field2, labelUList::null());
268 }
269 else
270 {
271 forAll(elementTypes(), elemI)
272 {
273 const labelUList& idList = elemLists_[elemI];
274
275 if (idList.size())
276 {
277 os.writeKeyword(elementTypes()[elemI]);
278 writeFieldList(os, field0, idList);
279 writeFieldList(os, field1, idList);
280 writeFieldList(os, field2, idList);
281 }
282 }
283 }
284 }
285}
286
287
288// * * * * * * * * * * * * * * * IOstream Operators * * * * * * * * * * * * //

Callers

nothing calls this directly

Calls 7

sizeFunction · 0.85
isFieldDefinedFunction · 0.85
writeFieldListFunction · 0.85
writeHeaderFunction · 0.70
nullClass · 0.50
forAllFunction · 0.50
sizeMethod · 0.45

Tested by

no test coverage detected