Foam::vtk::legacy Namespace Reference

Namespace for legacy VTK output constants and functions. More...

Functions

void fileHeader (std::ostream &os, const std::string &title, bool binary)
 Emit header for legacy file. More...
 
void fileHeader (vtk::formatter &fmt, const std::string &title, const std::string &contentType)
 
void fileHeader (vtk::formatter &fmt, const std::string &title, vtk::fileTag contentType)
 
template<vtk::fileTag ContentType>
void fileHeader (vtk::formatter &fmt, const std::string &title)
 
void beginPoints (std::ostream &os, label nPoints)
 Emit header for POINTS (with trailing newline). More...
 
void beginPolys (std::ostream &os, label nPolys, label nConnectivity)
 Emit header for POLYGONS (with trailing newline). More...
 
void fieldData (vtk::formatter &fmt, label nFields)
 Emit "FIELD FieldData <n>". More...
 
void beginFieldData (vtk::formatter &fmt, label nFields)
 Emit legacy FIELD FieldData nFields. More...
 
void beginCellData (vtk::formatter &fmt, label nCells, label nFields)
 Emit legacy CELL_DATA nCells, FIELD FieldData nFields. More...
 
void beginPointData (vtk::formatter &fmt, label nPoints, label nFields)
 Emit legacy POINT_DATA nPoints, FIELD FieldData nFields. More...
 
void writeTimeValue (vtk::formatter &fmt, scalar timeValue)
 Emit "TimeValue" for a FIELD entry (name as per Catalyst output) More...
 
template<direction nComp>
void floatField (vtk::formatter &fmt, const word &name, const label nEntries)
 Start output of float field with the specified name. More...
 
template<direction nComp>
void doubleField (vtk::formatter &fmt, const word &name, const label nEntries)
 Start output of double field with the specified name. More...
 
template<direction nComp>
void intField (vtk::formatter &fmt, const word &name, const label nEntries)
 Start output of int field with the specified name. More...
 

Variables

const word fileExtension
 Legacy file extension ("vtk") More...
 
const Foam::Enum< vtk::fileTagcontentNames
 Legacy content names (POLYDATA, UNSTRUCTURED_GRID) More...
 
const Foam::Enum< vtk::fileTagdataTypeNames
 Legacy data type names (CELL_DATA, POINT_DATA) More...
 

Detailed Description

Namespace for legacy VTK output constants and functions.

Source files

Function Documentation

◆ fileHeader() [1/4]

void fileHeader ( std::ostream &  os,
const std::string &  title,
bool  binary 
)

Emit header for legacy file.

Writes "ASCII" or "BINARY" depending on specified type.

Definition at line 224 of file foamVtkOutput.C.

References Foam::foamVersion::api, and Foam::nl.

Referenced by fileWriter::beginFile(), and fileHeader().

Here is the caller graph for this function:

◆ fileHeader() [2/4]

void fileHeader ( vtk::formatter fmt,
const std::string &  title,
const std::string &  contentType 
)

Emit header for legacy file, with "ASCII" or "BINARY" depending on the formatter type.

If the contentType is non-empty, it is used for "DATASET" line.

Definition at line 257 of file foamVtkOutput.C.

References fileHeader(), Foam::nl, and formatter::os().

Here is the call graph for this function:

◆ fileHeader() [3/4]

void fileHeader ( vtk::formatter fmt,
const std::string &  title,
vtk::fileTag  contentType 
)
inline

Emit header for legacy file, with "ASCII" or "BINARY" depending on the formatter type.

Includes "DATASET" with the specified dataset type.

Definition at line 92 of file foamVtkOutputI.H.

References contentNames, and fileHeader().

Here is the call graph for this function:

◆ fileHeader() [4/4]

void fileHeader ( vtk::formatter fmt,
const std::string &  title 
)
inline

Emit header for legacy file, with "ASCII" or "BINARY" depending on the formatter type.

Includes "DATASET" of the templated dataset type.

Definition at line 104 of file foamVtkOutputI.H.

References contentNames, and fileHeader().

Here is the call graph for this function:

◆ beginPoints()

void beginPoints ( std::ostream &  os,
label  nPoints 
)
inline

Emit header for POINTS (with trailing newline).

Definition at line 113 of file foamVtkOutputI.H.

References Foam::nl, and nPoints.

Referenced by VTKsurfaceFormatCore::writeHeader(), patchMeshWriter::writePoints(), and Foam::vtk::writePointSet().

Here is the caller graph for this function:

◆ beginPolys()

void beginPolys ( std::ostream &  os,
label  nPolys,
label  nConnectivity 
)
inline

Emit header for POLYGONS (with trailing newline).

The nConnectivity is the sum of all connectivity points used, but without additional space for the size prefixes. The additional prefix sizes are added internally.

Definition at line 121 of file foamVtkOutputI.H.

References Foam::nl.

Referenced by VTKsurfaceFormat< Face >::write(), and patchMeshWriter::writePolysLegacy().

Here is the caller graph for this function:

◆ fieldData()

void fieldData ( vtk::formatter fmt,
label  nFields 
)
inline

Emit "FIELD FieldData <n>".

Definition at line 133 of file foamVtkOutputI.H.

References Foam::nl, and formatter::os().

Referenced by beginCellData(), beginFieldData(), and beginPointData().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ beginFieldData()

void beginFieldData ( vtk::formatter fmt,
label  nFields 
)
inline

Emit legacy FIELD FieldData nFields.

Definition at line 144 of file foamVtkOutputI.H.

References fieldData().

Referenced by fileWriter::beginFieldData(), and fileWriter::writeTimeValue().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ beginCellData()

void beginCellData ( vtk::formatter fmt,
label  nCells,
label  nFields 
)
inline

Emit legacy CELL_DATA nCells, FIELD FieldData nFields.

Definition at line 154 of file foamVtkOutputI.H.

References dataTypeNames, fieldData(), Foam::nl, and formatter::os().

Referenced by lagrangianWriter::beginParcelData(), fileWriter::enter_CellData(), and VTKsurfaceFormatCore::writeCellData().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ beginPointData()

void beginPointData ( vtk::formatter fmt,
label  nPoints,
label  nFields 
)
inline

Emit legacy POINT_DATA nPoints, FIELD FieldData nFields.

Definition at line 169 of file foamVtkOutputI.H.

References dataTypeNames, fieldData(), Foam::nl, nPoints, formatter::os(), and Foam::expressions::patchExpr::POINT_DATA.

Referenced by lagrangianWriter::beginParcelData(), fileWriter::enter_PointData(), and Foam::vtk::writePointSet().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ writeTimeValue()

void writeTimeValue ( vtk::formatter fmt,
scalar  timeValue 
)
inline

Emit "TimeValue" for a FIELD entry (name as per Catalyst output)

Definition at line 184 of file foamVtkOutputI.H.

References formatter::flush(), and formatter::write().

Referenced by fileWriter::writeTimeValue().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ floatField()

void floatField ( vtk::formatter fmt,
const word name,
const label  nEntries 
)
inline

Start output of float field with the specified name.

Definition at line 211 of file foamVtkOutputI.H.

References Foam::nl, and formatter::os().

Here is the call graph for this function:

◆ doubleField()

void doubleField ( vtk::formatter fmt,
const word name,
const label  nEntries 
)
inline

Start output of double field with the specified name.

Definition at line 197 of file foamVtkOutputI.H.

References Foam::nl, and formatter::os().

Here is the call graph for this function:

◆ intField()

void intField ( vtk::formatter fmt,
const word name,
const label  nEntries 
)
inline

Start output of int field with the specified name.

Definition at line 225 of file foamVtkOutputI.H.

References Foam::nl, and formatter::os().

Here is the call graph for this function:

Variable Documentation

◆ fileExtension

const Foam::word fileExtension

Legacy file extension ("vtk")

Referenced by outputOptions::ext(), fileWriter::open(), and vtkWrite::write().

◆ contentNames

const Foam::Enum< Foam::vtk::fileTag > contentNames

Legacy content names (POLYDATA, UNSTRUCTURED_GRID)

Referenced by fileHeader().

◆ dataTypeNames

const Foam::Enum< Foam::vtk::fileTag > dataTypeNames

Legacy data type names (CELL_DATA, POINT_DATA)

Referenced by beginCellData(), and beginPointData().