28 #include "writeFuns.H" 37 const fileName& fileName
40 const faceList& faces = vMesh.mesh().faces();
42 std::ofstream ostr(fileName.c_str());
44 writeFuns::writeHeader
68 setFaceLabels[setFacei] = iter.key();
69 setFaces[setFacei] = faces[iter.key()];
77 ostr<<
"POINTS " << fp.nPoints() <<
" float" <<
std::endl;
79 DynamicList<floatScalar> ptField(3*fp.nPoints());
88 forAll(fp.localFaces(), facei)
90 nFaceVerts += fp.localFaces()[facei].size() + 1;
92 ostr<<
"POLYGONS " << fp.size() <<
' ' << nFaceVerts <<
std::endl;
95 DynamicList<label> vertLabels(nFaceVerts);
97 forAll(fp.localFaces(), facei)
99 const face& f = fp.localFaces()[facei];
101 vertLabels.append(f.size());
117 <<
"CELL_DATA " << fp.size() << std::endl
121 ostr<<
"faceID 1 " << fp.size() <<
" int" <<
std::endl;
#define forAll(list, i)
Loop across all elements in list.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Ostream & endl(Ostream &os)
Add newline and flush stream.
Write faceSet to vtk polydata file. Only one data which is original faceID.
timeIndices insert(timeIndex, timeDirs[timeI].value())
void writeFaceSet(const bool binary, const vtkMesh &vMesh, const faceSet &set, const fileName &fileName)
List< label > labelList
A List of labels.
forAllConstIter(PtrDictionary< phaseModel >, mixture.phases(), phase)
PrimitivePatch< face, List, const pointField & > primitiveFacePatch
Foam::primitiveFacePatch.
word name(const complex &)
Return a string representation of a complex.