Go to the documentation of this file.
29 #include "primitiveFacePatch.H"
43 const word& fieldName,
45 const fileName& fileName
48 std::ofstream pStream(fileName.c_str());
51 <<
"# vtk DataFile Version 2.0" <<
std::endl
61 pStream <<
"DATASET POLYDATA" <<
std::endl;
73 pStream <<
"POINTS " << fp.nPoints() <<
" float" <<
std::endl;
75 DynamicList<floatScalar> ptField(3*fp.nPoints());
84 forAll(fp.localFaces(), faceI)
86 nFaceVerts += fp.localFaces()[faceI].size() + 1;
88 pStream <<
"POLYGONS " << fp.size() <<
' ' << nFaceVerts
92 DynamicList<label> vertLabels(nFaceVerts);
94 forAll(fp.localFaces(), faceI)
96 const face&
f = fp.localFaces()[faceI];
114 <<
"CELL_DATA " << fp.size() <<
std::endl
118 pStream << fieldName <<
" 1 " << fp.size() <<
" int" <<
std::endl;
List< label > labelList
A List of labels.
#define forAll(list, i)
Loop across all elements in list.
Ostream & endl(Ostream &os)
Add newline and flush stream.
PrimitivePatch< face, List, const pointField & > primitiveFacePatch
Foam::primitiveFacePatch.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
void append(const T &)
Append an element at the end of the list.
static void write(std::ostream &, const bool, DynamicList< floatScalar > &)
Write floats ascii or binary.
Write faceSet to vtk polydata file. Only one data which is original faceID.
void writePatch(const bool binary, const word &setName, const primitiveFacePatch &fp, const word &fieldName, labelList &fieldValues, const fileName &fileName)
void size(const label)
Override size to be inconsistent with allocated storage.
static void insert(const point &, DynamicList< floatScalar > &dest)
Append point to given DynamicList.