Go to the documentation of this file.
45 #ifndef Foam_vtk_output_H
46 #define Foam_vtk_output_H
91 void writeIdentity(vtk::formatter& fmt,
const label len, label start=0);
99 inline void write(vtk::formatter& fmt,
const Type& val,
const label
n=1);
119 template<
class Type,
unsigned N>
129 const UList<Type>&
values,
139 const UList<Type>&
values,
140 const bitSet& selected
149 const UList<Type>& values1,
150 const UList<Type>& values2,
169 const UList<label>&
values,
170 const globalIndex& procOffset
179 const UList<Type>&
values,
189 const UList<Type>&
values,
190 const bitSet& selected
199 const UList<Type>& values1,
200 const UList<Type>& values2
209 const UList<Type>& values1,
210 const UList<Type>& values2,
226 void fileHeader(std::ostream&
os,
const std::string& title,
bool binary);
234 const std::string& title,
235 const std::string& contentType
244 const std::string& title,
251 template<vtk::fileTag ContentType>
252 inline void fileHeader(vtk::formatter& fmt,
const std::string& title);
261 inline void beginLines(std::ostream&
os, label nLines, label nConnectivity);
267 inline void beginPolys(std::ostream&
os, label nPolys, label nConnectivity);
271 inline void fieldData(vtk::formatter& fmt, label nFields);
294 inline void writeTimeValue(vtk::formatter& fmt, scalar timeValue);
297 template<direction nComp>
306 template<direction nComp>
315 template<direction nComp>
List< T > values(const HashTable< T, Key, Hash > &tbl, const bool doSort=false)
List of values from HashTable, optionally sorted.
void writeIdentity(vtk::formatter &fmt, const label len, label start=0)
Write an identity list of labels.
void beginPolys(std::ostream &os, label nPolys, label nConnectivity)
Emit header for POLYGONS (with trailing newline).
void beginPointData(vtk::formatter &fmt, label nPoints, label nFields)
Emit legacy POINT_DATA nPoints, FIELD FieldData nFields.
void fieldData(vtk::formatter &fmt, label nFields)
Emit "FIELD FieldData <n>".
void writeListsParallel(vtk::formatter &fmt, const UList< Type > &values1, const UList< Type > &values2)
Write a list of values and another list of values.
void beginFieldData(vtk::formatter &fmt, label nFields)
Emit legacy FIELD FieldData nFields.
formatType
The output format type for file contents.
void writeTimeValue(vtk::formatter &fmt, scalar timeValue)
Emit "TimeValue" for a FIELD entry (name as per Catalyst output)
void writeValueParallel(vtk::formatter &fmt, const Type &val, const label count=1)
Component-wise write of a value (N times) in parallel.
void writeList(vtk::formatter &fmt, const UList< uint8_t > &values)
Write a list of uint8_t values.
void writeLists(vtk::formatter &fmt, const UList< Type > &values1, const UList< Type > &values2, const labelUList &addressing)
Write a list of values and a list of values via indirect addressing.
void beginPoints(std::ostream &os, label nPoints)
Emit header for POINTS (with trailing newline).
void fileHeader(std::ostream &os, const std::string &title, bool binary)
Emit header for legacy file (vtk DataFile Version 2.0)
OBJstream os(runTime.globalPath()/outputName)
fileTag
Some common XML tags for vtk files.
void beginCellData(vtk::formatter &fmt, label nCells, label nFields)
Emit legacy CELL_DATA nCells, FIELD FieldData nFields.
static unsigned int defaultPrecision() noexcept
Return the default precision.
void beginLines(std::ostream &os, label nLines, label nConnectivity)
Emit header for LINES (with trailing newline).
unsigned int count(const UList< bool > &bools, const bool val=true)
Count number of 'true' entries.
void floatField(vtk::formatter &fmt, const word &name, const label nEntries)
Start output of float field with the specified name.
void intField(vtk::formatter &fmt, const word &name, const label nEntries)
Start output of int field with the specified name.
void write(vtk::formatter &fmt, const Type &val, const label n=1)
Component-wise write of a value (N times)
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for INVALID.
autoPtr< vtk::formatter > newFormatter(std::ostream &os, unsigned prec=IOstream::defaultPrecision())
Return a default asciiFormatter.
void writeListParallel(vtk::formatter &fmt, const UList< Type > &values)
Write a list of values.
UList< label > labelUList
A UList of labels.
void doubleField(vtk::formatter &fmt, const word &name, const label nEntries)
Start output of double field with the specified name.