33 const std::string& title,
41template<Foam::vtk::fileTag ContentType>
45 const std::string& title
70 nConnectivity = nVerts;
75 <<
' ' << (nVerts + nConnectivity) <<
nl;
88 nConnectivity = 2*nLines;
93 <<
' ' << (nLines + nConnectivity) <<
nl;
107 <<
' ' << (nPolys + nConnectivity) <<
nl;
118 <<
"FIELD FieldData " << nFields <<
nl;
142 <<
' ' << nCells <<
nl;
169 fmt.
write(timeValue);
174template<Foam::direction nComp>
178 const word& fieldName,
184 << int(nComp) <<
' ' << nEntries <<
" double" <<
nl;
188template<Foam::direction nComp>
192 const word& fieldName,
198 << int(nComp) <<
' ' << nEntries <<
" float" <<
nl;
202template<Foam::direction nComp>
206 const word& fieldName,
212 << 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).
const Foam::Enum< vtk::fileTag > contentNames
Legacy content names (POLYDATA, UNSTRUCTURED_GRID).
void beginCellData(vtk::formatter &fmt, label nCells, label nFields)
Emit legacy CELL_DATA nCells, FIELD FieldData nFields.
const Foam::Enum< vtk::fileTag > fileTagNames
Legacy file tags (eg, LINES, CELL_DATA, POINT_DATA, ...).
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.
fileTag
Some common XML tags for vtk files.
constexpr char nl
The newline '\n' character (0x0a).