39 for (label i=0; i <
n; ++i)
50 for (label i=0; i <
n; ++i)
61 for (label i=0; i <
n; ++i)
73 for (label i=0; i <
n; ++i)
94 const std::string& title,
98 legacy::fileHeader(fmt, title, legacy::contentNames[contentType]);
102template<Foam::vtk::fileTag ContentType>
106 const std::string& title
109 legacy::fileHeader(fmt, title, legacy::contentNames[ContentType]);
116 << legacy::fileTagNames[vtk::fileTag::POINTS]
131 nConnectivity = nVerts;
134 << legacy::fileTagNames[vtk::fileTag::VERTS]
136 <<
' ' << (nVerts + nConnectivity) <<
nl;
149 nConnectivity = 2*nLines;
152 << legacy::fileTagNames[vtk::fileTag::LINES]
154 <<
' ' << (nLines + nConnectivity) <<
nl;
166 << legacy::fileTagNames[vtk::fileTag::POLYS]
168 <<
' ' << (nPolys + nConnectivity) <<
nl;
179 <<
"FIELD FieldData " << nFields <<
nl;
189 legacy::fieldData(fmt, nFields);
202 << legacy::fileTagNames[vtk::fileTag::CELL_DATA]
203 <<
' ' << nCells <<
nl;
204 legacy::fieldData(fmt, nFields);
217 << legacy::fileTagNames[vtk::fileTag::POINT_DATA]
219 legacy::fieldData(fmt, nFields);
229 legacy::floatField<1>(fmt,
"TimeValue", 1);
230 fmt.
write(timeValue);
235template<Foam::direction nComp>
239 const word& fieldName,
245 << int(nComp) <<
' ' << nEntries <<
" double" <<
nl;
249template<Foam::direction nComp>
253 const word& fieldName,
259 << int(nComp) <<
' ' << nEntries <<
" float" <<
nl;
263template<Foam::direction nComp>
267 const word& fieldName,
273 << int(nComp) <<
' ' << nEntries <<
" int" <<
nl;
A class for handling words, derived from Foam::string.
OBJstream os(runTime.globalPath()/outputName)
void intField(vtk::formatter &fmt, const word &name, const label nEntries)
Start output of int field with the specified name.
void beginPolys(std::ostream &os, label nPolys, label nConnectivity)
Emit header for POLYGONS (with trailing newline).
void beginLines(std::ostream &os, label nLines, label nConnectivity=0)
Emit header for LINES (with trailing newline).
void doubleField(vtk::formatter &fmt, const word &name, const label nEntries)
Start output of double field with the specified name.
void fieldData(vtk::formatter &fmt, label nFields)
Emit "FIELD FieldData <n>".
void beginPoints(std::ostream &os, label nPoints)
Emit header for POINTS (with trailing newline).
void beginCellData(vtk::formatter &fmt, label nCells, label nFields)
Emit legacy CELL_DATA nCells, FIELD FieldData nFields.
void fileHeader(std::ostream &os, const std::string &title, bool binary)
Emit header for legacy file (vtk DataFile Version 2.0)
void beginPointData(vtk::formatter &fmt, label nPoints, label nFields)
Emit legacy POINT_DATA nPoints, FIELD FieldData nFields.
void writeTimeValue(vtk::formatter &fmt, scalar timeValue)
Emit "TimeValue" for a FIELD entry (name as per Catalyst output)
void floatField(vtk::formatter &fmt, const word &name, const label nEntries)
Start output of float field with the specified name.
void beginVerts(std::ostream &os, label nVerts, label nConnectivity=0)
Emit header for VERTICES (with trailing newline).
void beginFieldData(vtk::formatter &fmt, label nFields)
Emit legacy FIELD FieldData nFields.
void write< float >(vtk::formatter &fmt, const float &val, const label n)
Template specialization for float.
void write< label >(vtk::formatter &fmt, const label &val, const label n)
Template specialization for label.
fileTag
Some common XML tags for vtk files.
void write< double >(vtk::formatter &fmt, const double &val, const label n)
Template specialization for double.
void component(FieldField< Field, typename FieldField< Field, Type >::cmptType > &sf, const FieldField< Field, Type > &f, const direction d)
constexpr char nl
The newline '\n' character (0x0a)