Loading...
Searching...
No Matches
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 (vtk DataFile Version 2.0).
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.
void fileHeader (vtk::formatter &fmt, const std::string &title, vtk::fileTag contentType)
 Emit header for legacy file, with "ASCII" or "BINARY" depending on the formatter type.
template<vtk::fileTag ContentType>
void fileHeader (vtk::formatter &fmt, const std::string &title)
 Emit header for legacy file, with "ASCII" or "BINARY" depending on the formatter type.
void beginPoints (std::ostream &os, label nPoints)
 Emit header for POINTS (with trailing newline).
void beginVerts (std::ostream &os, label nVerts, label nConnectivity=0)
 Emit header for VERTICES (with trailing newline).
void beginLines (std::ostream &os, label nLines, label nConnectivity=0)
 Emit header for LINES (with trailing newline).
void beginPolys (std::ostream &os, label nPolys, label nConnectivity)
 Emit header for POLYGONS (with trailing newline).
void fieldData (vtk::formatter &fmt, label nFields)
 Emit "FIELD FieldData <n>".
void beginFieldData (vtk::formatter &fmt, label nFields)
 Emit legacy FIELD FieldData nFields.
void beginCellData (vtk::formatter &fmt, label nCells, label nFields)
 Emit legacy CELL_DATA nCells, FIELD FieldData nFields.
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).
template<direction nComp>
void floatField (vtk::formatter &fmt, const word &name, const label nEntries)
 Start output of float field with the specified name.
template<direction nComp>
void doubleField (vtk::formatter &fmt, const word &name, const label nEntries)
 Start output of double field with the specified name.
template<direction nComp>
void intField (vtk::formatter &fmt, const word &name, const label nEntries)
 Start output of int field with the specified name.

Variables

const word fileExtension
 Legacy file extension ("vtk").
const Foam::Enum< vtk::fileTagcontentNames
 Legacy content names (POLYDATA, UNSTRUCTURED_GRID).
const Foam::Enum< vtk::fileTagfileTagNames
 Legacy file tags (eg, LINES, CELL_DATA, POINT_DATA, ...).
const Foam::Enum< dataArrayAttrdataArrayAttrNames
 Legacy attributes (eg, OFFSETS).

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 (vtk DataFile Version 2.0).

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

References os().

Referenced by fileHeader(), fileHeader(), and VTKsurfaceFormatCore::writeHeader().

Here is the call graph for this function:
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.

References Foam::name(), nPoints, and 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 23 of file foamVtkOutputI.H.

References contentNames, and fileHeader().

Here is the call graph for this function:

◆ fileHeader() [4/4]

template<vtk::fileTag ContentType>
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 35 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 45 of file foamVtkOutputI.H.

References fileTagNames, Foam::nl, nPoints, os(), and Foam::vtk::POINTS.

Referenced by VTKsurfaceFormatCore::writeHeader().

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

◆ beginVerts()

void beginVerts ( std::ostream & os,
label nVerts,
label nConnectivity = 0 )
inline

Emit header for VERTICES (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.

Note
With nConnectivity == 0, assume one point per element

Definition at line 54 of file foamVtkOutputI.H.

References fileTagNames, Foam::nl, os(), and Foam::vtk::VERTS.

Here is the call graph for this function:

◆ beginLines()

void beginLines ( std::ostream & os,
label nLines,
label nConnectivity = 0 )
inline

Emit header for LINES (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.

Note
With nConnectivity == 0, assume two points per element

Definition at line 72 of file foamVtkOutputI.H.

References fileTagNames, Foam::vtk::LINES, Foam::nl, and os().

Here is the call 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 90 of file foamVtkOutputI.H.

References fileTagNames, Foam::nl, os(), and Foam::vtk::POLYS.

Referenced by VTKsurfaceFormat< Face >::write().

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

◆ fieldData()

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

Emit "FIELD FieldData <n>".

Definition at line 104 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 115 of file foamVtkOutputI.H.

References fieldData().

Here is the call 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 125 of file foamVtkOutputI.H.

References Foam::vtk::CELL_DATA, fieldData(), fileTagNames, Foam::nl, and formatter::os().

Referenced by VTKsurfaceFormatCore::writeCellData(), 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 140 of file foamVtkOutputI.H.

References fieldData(), fileTagNames, Foam::nl, nPoints, formatter::os(), and Foam::vtk::POINT_DATA.

Here is the call 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 155 of file foamVtkOutputI.H.

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

Here is the call graph for this function:

◆ floatField()

template<direction nComp>
void floatField ( vtk::formatter & fmt,
const word & name,
const label nEntries )
inline

Start output of float field with the specified name.

Definition at line 182 of file foamVtkOutputI.H.

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

Referenced by writeTimeValue().

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

◆ doubleField()

template<direction nComp>
void doubleField ( vtk::formatter & fmt,
const word & name,
const label nEntries )
inline

Start output of double field with the specified name.

Definition at line 168 of file foamVtkOutputI.H.

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

Here is the call graph for this function:

◆ intField()

template<direction nComp>
void intField ( vtk::formatter & fmt,
const word & name,
const label nEntries )
inline

Start output of int field with the specified name.

Definition at line 196 of file foamVtkOutputI.H.

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

Referenced by VTKsurfaceFormatCore::writeCellData(), and VTKsurfaceFormatCore::writeCellData().

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

Variable Documentation

◆ fileExtension

const word fileExtension
extern

Legacy file extension ("vtk").

Referenced by outputOptions::ext().

◆ contentNames

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

Legacy content names (POLYDATA, UNSTRUCTURED_GRID).

Referenced by fileHeader(), and fileHeader().

◆ fileTagNames

const Foam::Enum<vtk::fileTag> fileTagNames
extern

Legacy file tags (eg, LINES, CELL_DATA, POINT_DATA, ...).

Referenced by beginCellData(), beginLines(), beginPointData(), beginPoints(), beginPolys(), and beginVerts().

◆ dataArrayAttrNames

const Foam::Enum<dataArrayAttr> dataArrayAttrNames
extern

Legacy attributes (eg, OFFSETS).