Foam::vtk Namespace Reference

Namespace for handling VTK input/output. More...

Namespaces

namespace  legacy
 Namespace for legacy VTK output constants and functions.
 
namespace  Tools
 A collection of static methods to assist converting OpenFOAM data structures into VTK internal data structures.
 

Classes

class  appendBase64Formatter
 Appended base-64 encoded binary output. Uses an output filter layer to write base-64 encoded content. More...
 
class  appendRawFormatter
 Appended raw binary output. More...
 
class  asciiFormatter
 Inline ASCII output. Adds spaces between entries and a newline every 9 items (for consistency with what VTK itself outputs). More...
 
class  base64Formatter
 Inline base-64 encoded binary output. Uses an output filter layer to write base-64 encoded content. More...
 
struct  Caching
 Bookkeeping for internal caching. More...
 
class  coordSetWriter
 Write as points/lines, optionally with fields, as a vtp file or a legacy vtk file. More...
 
class  fileWriter
 Base class for VTK output writers that handle geometry and fields (eg, vtp, vtu data). These output formats are structured as DECLARED, FIELD_DATA, PIECE followed by any CELL_DATA or POINT_DATA. More...
 
class  foamVtkBase64Layer
 Base-64 encoded output layer - normally only used indirectly by formatters. More...
 
class  formatter
 Abstract class for a VTK output stream formatter. More...
 
class  GenericPatchGeoFieldsWriter
 A Foam::vtk::GenericPatchWriter with support for geometric fields. More...
 
class  GenericPatchWriter
 Write concrete PrimitivePatch faces/points (optionally with fields) as a vtp file or a legacy vtk file. The patch type is limited to representations of polygon faces and 3D points and must support the following methods: More...
 
class  internalMeshWriter
 Write an OpenFOAM volume (internal) geometry and internal fields as a vtu file or a legacy vtk file. More...
 
class  internalWriter
 Write an OpenFOAM volume (internal) geometry and internal fields as a vtu file or a legacy vtk file. More...
 
class  lagrangianWriter
 Write lagrangian (cloud) positions and fields (as PointData) in VTP format. Legacy VTK format is intentionally not supported since the VTP format provides much better field selection in ParaView, and for consistency with the Foam::functionObjects::vtkCloud function object. More...
 
class  legacyAsciiFormatter
 Formatting as per Foam::vtk::asciiFormatter, but with naming for legacy output. More...
 
class  legacyRawFormatter
 Binary output for the VTK legacy format, always written as big-endian and with 32-bit integers. More...
 
class  lineWriter
 Write edge/points (optionally with fields) as a vtp file or a legacy vtk file. More...
 
class  outputOptions
 Encapsulated combinations of output format options. This is primarily useful when defining the output type based on some command-line arguments or dictionary contents. However, it can also be a useful alternative to using the underlying enumeration directly, since this class provides additional methods not possible with an enum. More...
 
class  patchMeshWriter
 Write OpenFOAM patches and patch fields in VTP or legacy vtk format. More...
 
class  patchWriter
 Write OpenFOAM patches and patch fields in VTP or legacy vtk format. More...
 
class  polyWriter
 Write faces/points (optionally with fields) as a vtp file or a legacy vtk file. More...
 
class  seriesWriter
 Provides a means of accumulating and generating VTK file series. More...
 
class  surfaceFieldWriter
 Write surfaces fields (as PointData) in VTP format. Legacy VTK format is intentionally not supported. More...
 
class  surfaceWriter
 Write faces/points (optionally with fields) as a vtp file or a legacy vtk file. More...
 
class  vtmWriter
 Provides a means of accumulating file entries for generating a vtkMultiBlockDataSet (.vtm) file. More...
 
class  vtuAdaptor
 Bookkeeping for vtkUnstructuredGrid. More...
 
class  vtuCells
 A deep-copy description of an OpenFOAM volume mesh in data structures suitable for VTK UnstructuredGrid, including the possibility of decomposing polyhedral cells into primitive cell types. More...
 
class  vtuSizing
 Sizing descriptions and routines for transcribing an OpenFOAM volume mesh into a VTK unstructured grid, with possible decomposition of polyhedral cells into primitive cell types. More...
 

Typedefs

typedef GenericPatchGeoFieldsWriter< indirectPrimitivePatchindirectPatchGeoFieldsWriter
 Write indirectPrimitivePatch faces/points as a vtp file or a legacy vtk file with support for geometric fields. More...
 
typedef GenericPatchGeoFieldsWriter< uindirectPrimitivePatchuindirectPatchGeoFieldsWriter
 Write uindirectPrimitivePatch faces/points as a vtp file or a legacy vtk file with support for geometric fields. More...
 
typedef indirectPatchGeoFieldsWriter surfaceMeshWriter
 
typedef GenericPatchWriter< indirectPrimitivePatchindirectPatchWriter
 Write indirectPrimitivePatch faces/points (optionally with fields) as a vtp file or a legacy vtk file. More...
 
typedef GenericPatchWriter< uindirectPrimitivePatchuindirectPatchWriter
 Write uindirectPrimitivePatch faces/points (optionally with fields) as a vtp file or a legacy vtk file. More...
 
typedef GenericPatchWriter< primitivePatchprimitivePatchWriter
 Write primitivePatch faces/points (optionally with fields) as a vtp file or a legacy vtk file. More...
 

Enumerations

enum  OutputContext : uint8_t { INLINE , HEADER , APPEND }
 The context when outputting a VTK file (XML or legacy). More...
 
enum class  formatType : uint8_t {
  INLINE_ASCII = 0 , INLINE_BASE64 = 0x01 , APPEND_BASE64 = 0x11 , APPEND_BINARY = 0x12 ,
  LEGACY_ASCII = 0x20 , LEGACY_BINARY = 0x22
}
 The output format type for file contents. More...
 
enum  cellType : uint8_t {
  VTK_EMPTY_CELL = 0 , VTK_VERTEX = 1 , VTK_POLY_VERTEX = 2 , VTK_LINE = 3 ,
  VTK_POLY_LINE = 4 , VTK_TRIANGLE = 5 , VTK_TRIANGLE_STRIP = 6 , VTK_POLYGON = 7 ,
  VTK_PIXEL = 8 , VTK_QUAD = 9 , VTK_TETRA = 10 , VTK_VOXEL = 11 ,
  VTK_HEXAHEDRON = 12 , VTK_WEDGE = 13 , VTK_PYRAMID = 14 , VTK_PENTAGONAL_PRISM = 15 ,
  VTK_HEXAGONAL_PRISM = 16 , VTK_POLYHEDRON = 42
}
 Equivalent to enumeration in "vtkCellType.h" (should be uint8_t) More...
 
enum class  fileTag : uint8_t {
  VTK_FILE , DATA_ARRAY , BLOCK , PIECE ,
  DATA_SET , POINTS , CELLS , POLYS ,
  VERTS , LINES , CELL_DATA , POINT_DATA ,
  FIELD_DATA , POLY_DATA , UNSTRUCTURED_GRID , MULTI_BLOCK
}
 Some common XML tags for vtk files. More...
 
enum class  fileAttr : uint8_t {
  OFFSET , NUMBER_OF_COMPONENTS , NUMBER_OF_TUPLES , NUMBER_OF_POINTS ,
  NUMBER_OF_CELLS , NUMBER_OF_POLYS , NUMBER_OF_VERTS , NUMBER_OF_LINES
}
 Some common XML attributes for vtk files. More...
 
enum class  dataArrayAttr : uint8_t {
  POINTS , OFFSETS , CONNECTIVITY , TYPES ,
  FACES , FACEOFFSETS
}
 Some common names for XML DataArray entries. More...
 

Functions

bool isAppend (enum formatType fmt) noexcept
 Test for vtk append format (xml) More...
 
bool isLegacy (enum formatType fmt) noexcept
 Test for vtk legacy format. More...
 
template<class Type , direction nComp = 1>
uint64_t sizeofData (label count)
 Commonly used calculation for header and payload sizes. More...
 
autoPtr< vtk::formatternewFormatter (std::ostream &os, unsigned prec=IOstream::defaultPrecision())
 Return a default asciiFormatter. More...
 
autoPtr< vtk::formatternewFormatter (std::ostream &os, const enum formatType fmtType, unsigned prec=IOstream::defaultPrecision())
 Return a new formatter based on the specified format type. More...
 
void writeIdentity (vtk::formatter &fmt, const label len, label start=0)
 Write an identity list of labels. More...
 
void writeList (vtk::formatter &fmt, const UList< uint8_t > &values)
 Write a list of uint8_t values. More...
 
template<class Type >
void write (vtk::formatter &fmt, const Type &val, const label n=1)
 Component-wise write of a value (N times) More...
 
template<class Type >
void writeValueParallel (vtk::formatter &fmt, const Type &val, const label count=1)
 Component-wise write of a value (N times) in parallel. More...
 
template<class Type >
void writeList (vtk::formatter &fmt, const UList< Type > &values)
 Write a list of values. More...
 
template<class Type , unsigned N>
void writeList (vtk::formatter &fmt, const FixedList< Type, N > &values)
 Write a list of values. More...
 
template<class Type >
void writeList (vtk::formatter &fmt, const UList< Type > &values, const labelUList &addressing)
 Write a list of values via indirect addressing. More...
 
template<class Type >
void writeList (vtk::formatter &fmt, const UList< Type > &values, const bitSet &selected)
 Write a list of values via indirect addressing. More...
 
template<class Type >
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. More...
 
template<class Type >
void writeListParallel (vtk::formatter &fmt, const UList< Type > &values)
 Write a list of values. More...
 
void writeListParallel (vtk::formatter &fmt, const UList< label > &values, const globalIndex &procOffset)
 Write a list of values, with constant per-processor offset. More...
 
template<class Type >
void writeListParallel (vtk::formatter &fmt, const UList< Type > &values, const labelUList &addressing)
 Write a list of values via indirect addressing. More...
 
template<class Type >
void writeListParallel (vtk::formatter &fmt, const UList< Type > &values, const bitSet &selected)
 Write a list of values via indirect addressing. More...
 
template<class Type >
void writeListsParallel (vtk::formatter &fmt, const UList< Type > &values1, const UList< Type > &values2)
 Write a list of values and another list of values. More...
 
template<class Type >
void writeListsParallel (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. More...
 
template<>
void write< label > (vtk::formatter &fmt, const label &val, const label n)
 Template specialization for label. More...
 
template<>
void write< float > (vtk::formatter &fmt, const float &val, const label n)
 Template specialization for float. More...
 
template<>
void write< double > (vtk::formatter &fmt, const double &val, const label n)
 Template specialization for double. More...
 
template<>
void write (vtk::formatter &fmt, const symmTensor &val, const label n)
 Template specialization for symmTensor ordering. More...
 
bool writeTopoSet (const polyMesh &mesh, const topoSet &set, const vtk::outputOptions opts, const fileName &file, bool parallel=Pstream::parRun())
 Dispatch to vtk::writeCellSetFaces, vtk::writeFaceSet, vtk::writePointSet. More...
 
bool writeFaceSet (const polyMesh &mesh, const faceSet &set, const vtk::outputOptions opts, const fileName &file, bool parallel=Pstream::parRun())
 Write faceSet as VTK polydata file. More...
 
bool writeCellSetFaces (const polyMesh &mesh, const cellSet &set, const vtk::outputOptions opts, const fileName &file, bool parallel=Pstream::parRun())
 Write perimeter faces of cellset to vtk polydata file. More...
 
bool writePointSet (const polyMesh &mesh, const pointSet &set, const vtk::outputOptions opts, const fileName &file, bool parallel=Pstream::parRun())
 Write pointSet to VTK polydata file. More...
 

Variables

const Foam::Enum< fileTagfileExtension
 File extension (without ".") for some vtk XML file content types. More...
 
const Foam::Enum< fileTagfileContentVersions
 Version string for some vtk XML file content types. More...
 
const Foam::Enum< fileTagfileTagNames
 Strings corresponding to the vtk XML tags. More...
 
const Foam::Enum< fileAttrfileAttrNames
 Strings corresponding to the vtk XML attributes. More...
 
const Foam::Enum< dataArrayAttrdataArrayAttrNames
 Strings corresponding to the vtk XML DataArray attributes. More...
 

Detailed Description

Namespace for handling VTK input/output.

Namespace for handling VTK output. Contains classes and functions for writing VTK file content.

Source files

Typedef Documentation

◆ indirectPatchGeoFieldsWriter

Write indirectPrimitivePatch faces/points as a vtp file or a legacy vtk file with support for geometric fields.

Definition at line 64 of file foamVtkIndPatchGeoFieldsWriter.H.

◆ uindirectPatchGeoFieldsWriter

Write uindirectPrimitivePatch faces/points as a vtp file or a legacy vtk file with support for geometric fields.

See also
Foam::vtk::GenericPatchWriter

Definition at line 68 of file foamVtkIndPatchGeoFieldsWriter.H.

◆ surfaceMeshWriter

◆ indirectPatchWriter

Write indirectPrimitivePatch faces/points (optionally with fields) as a vtp file or a legacy vtk file.

Definition at line 62 of file foamVtkIndPatchWriter.H.

◆ uindirectPatchWriter

Write uindirectPrimitivePatch faces/points (optionally with fields) as a vtp file or a legacy vtk file.

See also
Foam::vtk::GenericPatchWriter

Definition at line 66 of file foamVtkIndPatchWriter.H.

◆ primitivePatchWriter

Write primitivePatch faces/points (optionally with fields) as a vtp file or a legacy vtk file.

See also
Foam::vtk::GenericPatchWriter

Definition at line 55 of file foamVtkPrimitivePatchWriter.H.

Enumeration Type Documentation

◆ OutputContext

enum OutputContext : uint8_t

The context when outputting a VTK file (XML or legacy).

Enumerator
INLINE 

Generate header and inline data.

HEADER 

Generate header only.

APPEND 

Generate append-data.

Definition at line 55 of file foamVtkCore.H.

◆ formatType

enum class formatType : uint8_t
strong

The output format type for file contents.

Upper bits for output type, lower bits for the format itself.

Enumerator
INLINE_ASCII 

XML inline ASCII, asciiFormatter.

INLINE_BASE64 

XML inline base64, base64Formatter.

APPEND_BASE64 

XML append base64, appendBase64Formatter.

APPEND_BINARY 

XML append raw binary, appendRawFormatter.

LEGACY_ASCII 

Legacy ASCII, legacyAsciiFormatter.

LEGACY_BINARY 

Legacy raw binary, legacyRawFormatter.

Definition at line 65 of file foamVtkCore.H.

◆ cellType

enum cellType : uint8_t

Equivalent to enumeration in "vtkCellType.h" (should be uint8_t)

Enumerator
VTK_EMPTY_CELL 
VTK_VERTEX 
VTK_POLY_VERTEX 
VTK_LINE 
VTK_POLY_LINE 
VTK_TRIANGLE 
VTK_TRIANGLE_STRIP 
VTK_POLYGON 
VTK_PIXEL 
VTK_QUAD 
VTK_TETRA 
VTK_VOXEL 
VTK_HEXAHEDRON 
VTK_WEDGE 
VTK_PYRAMID 
VTK_PENTAGONAL_PRISM 
VTK_HEXAGONAL_PRISM 
VTK_POLYHEDRON 

Definition at line 89 of file foamVtkCore.H.

◆ fileTag

enum class fileTag : uint8_t
strong

Some common XML tags for vtk files.

Enumerator
VTK_FILE 

"VTKFile"

DATA_ARRAY 

"DataArray"

BLOCK 

"Block"

PIECE 

"Piece"

DATA_SET 

"DataSet"

POINTS 

"Points"

CELLS 

"Cells"

POLYS 

"Polys"

VERTS 

"Verts"

LINES 

"Lines"

CELL_DATA 

"CellData"

POINT_DATA 

"PointData"

FIELD_DATA 

"FieldData"

POLY_DATA 

"PolyData"

UNSTRUCTURED_GRID 

"UnstructuredGrid"

MULTI_BLOCK 

"vtkMultiBlockDataSet"

Definition at line 113 of file foamVtkCore.H.

◆ fileAttr

enum class fileAttr : uint8_t
strong

Some common XML attributes for vtk files.

Enumerator
OFFSET 

"offset"

NUMBER_OF_COMPONENTS 

"NumberOfComponents"

NUMBER_OF_TUPLES 

"NumberOfTuples"

NUMBER_OF_POINTS 

"NumberOfPoints"

NUMBER_OF_CELLS 

"NumberOfCells"

NUMBER_OF_POLYS 

"NumberOfPolys"

NUMBER_OF_VERTS 

"NumberOfVerts"

NUMBER_OF_LINES 

"NumberOfLines"

Definition at line 143 of file foamVtkCore.H.

◆ dataArrayAttr

enum class dataArrayAttr : uint8_t
strong

Some common names for XML DataArray entries.

Enumerator
POINTS 

"Points"

OFFSETS 

"offsets"

CONNECTIVITY 

"connectivity"

TYPES 

"types"

FACES 

"faces"

FACEOFFSETS 

"faceoffsets"

Definition at line 159 of file foamVtkCore.H.

Function Documentation

◆ isAppend()

bool isAppend ( enum formatType  fmt)
inlinenoexcept

Test for vtk append format (xml)

Definition at line 76 of file foamVtkCore.H.

◆ isLegacy()

bool isLegacy ( enum formatType  fmt)
inlinenoexcept

Test for vtk legacy format.

Definition at line 82 of file foamVtkCore.H.

◆ sizeofData()

uint64_t sizeofData ( label  count)
inline

Commonly used calculation for header and payload sizes.

Definition at line 549 of file foamVtkFormatter.H.

◆ newFormatter() [1/2]

Foam::autoPtr< Foam::vtk::formatter > newFormatter ( std::ostream &  os,
unsigned  prec = IOstream::defaultPrecision() 
)

Return a default asciiFormatter.

Definition at line 48 of file foamVtkOutput.C.

References os().

Referenced by outputOptions::newFormatter(), vtmWriter::write(), lumpedPointMovement::writeForcesAndMomentsVTP(), and lumpedPointState::writeVTP().

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

◆ newFormatter() [2/2]

Foam::autoPtr< Foam::vtk::formatter > newFormatter ( std::ostream &  os,
const enum formatType  fmtType,
unsigned  prec = IOstream::defaultPrecision() 
)

Return a new formatter based on the specified format type.

Definition at line 55 of file foamVtkOutput.C.

References os(), and autoPtr< T >::reset().

Here is the call graph for this function:

◆ writeIdentity()

void writeIdentity ( vtk::formatter fmt,
const label  len,
label  start = 0 
)

Write an identity list of labels.

The output does not include the payload size.

Definition at line 95 of file foamVtkOutput.C.

References formatter::write().

Referenced by lumpedPointMovement::writeForcesAndMomentsVTP(), and lumpedPointState::writeVTP().

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

◆ writeList() [1/5]

void writeList ( vtk::formatter fmt,
const UList< uint8_t > &  values 
)

Write a list of uint8_t values.

The output does not include the payload size.

Definition at line 111 of file foamVtkOutput.C.

References formatter::write().

Referenced by internalWriter::write(), patchWriter::write(), surfaceFieldWriter::write(), fileWriter::writeBasicField(), internalMeshWriter::writeCellData(), VTKsurfaceFormatCore::writeCellData(), VTPsurfaceFormatCore::writeCellData(), internalMeshWriter::writeCellIDs(), lumpedPointMovement::writeForcesAndMomentsVTP(), surfaceFieldWriter::writeGeometry(), lagrangianWriter::writeGeometry(), VTKsurfaceFormatCore::writeHeader(), VTPsurfaceFormatCore::writeHeader(), internalMeshWriter::writePointData(), coordSetWriter::writePointData(), internalMeshWriter::writePointIDs(), patchMeshWriter::writePoints(), patchMeshWriter::writePolys(), patchMeshWriter::writePolysLegacy(), and lumpedPointState::writeVTP().

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

◆ write() [1/2]

void write ( vtk::formatter fmt,
const Type &  val,
const label  n = 1 
)
inline

Component-wise write of a value (N times)

Definition at line 35 of file foamVtkOutputTemplates.C.

References Foam::component(), n, and formatter::write().

Referenced by internalWriter::write(), VTKsurfaceFormatCore::writeCellData(), VTPsurfaceFormatCore::writeCellData(), patchMeshWriter::writeNeighIDs(), patchMeshWriter::writePatchIDs(), fileWriter::writeProcIDs(), fileWriter::writeUniform(), and lumpedPointState::writeVTP().

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

◆ writeValueParallel()

void writeValueParallel ( vtk::formatter fmt,
const Type &  val,
const label  count = 1 
)
inline

Component-wise write of a value (N times) in parallel.

The value and count may differ on each processor

Definition at line 127 of file foamVtkOutputTemplates.C.

References Foam::endl(), Foam::exit(), Foam::FatalError, FatalErrorInFunction, and forAll.

Referenced by fileWriter::writeUniform().

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

◆ writeList() [2/5]

void writeList ( vtk::formatter fmt,
const UList< Type > &  values 
)

Write a list of values.

The output does not include the payload size.

Definition at line 55 of file foamVtkOutputTemplates.C.

◆ writeList() [3/5]

void writeList ( vtk::formatter fmt,
const FixedList< Type, N > &  values 
)

Write a list of values.

The output does not include the payload size.

Definition at line 69 of file foamVtkOutputTemplates.C.

◆ writeList() [4/5]

void writeList ( vtk::formatter fmt,
const UList< Type > &  values,
const labelUList addressing 
)

Write a list of values via indirect addressing.

The output does not include the payload size.

Definition at line 83 of file foamVtkOutputTemplates.C.

◆ writeList() [5/5]

void writeList ( vtk::formatter fmt,
const UList< Type > &  values,
const bitSet selected 
)

Write a list of values via indirect addressing.

The output does not include the payload size.

Definition at line 98 of file foamVtkOutputTemplates.C.

◆ writeLists()

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.

The output does not include the payload size.

Definition at line 113 of file foamVtkOutputTemplates.C.

Referenced by internalWriter::write().

Here is the caller graph for this function:

◆ writeListParallel() [1/4]

void writeListParallel ( vtk::formatter fmt,
const UList< Type > &  values 
)

Write a list of values.

The output does not include the payload size.

Definition at line 158 of file foamVtkOutputTemplates.C.

References UList< T >::data_bytes(), Foam::endl(), Foam::exit(), Foam::FatalError, FatalErrorInFunction, procAddr(), DynamicList< T, SizeMin >::resize_nocopy(), and UList< T >::size_bytes().

Referenced by surfaceFieldWriter::write(), fileWriter::writeBasicField(), internalMeshWriter::writeCellData(), internalMeshWriter::writeCellIDs(), vtkCloud::writeFields(), surfaceFieldWriter::writeGeometry(), lagrangianWriter::writeGeometry(), internalMeshWriter::writePointData(), internalMeshWriter::writePointIDs(), patchMeshWriter::writePolys(), and patchMeshWriter::writePolysLegacy().

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

◆ writeListParallel() [2/4]

void writeListParallel ( vtk::formatter fmt,
const UList< label > &  values,
const globalIndex procOffset 
)

Write a list of values, with constant per-processor offset.

The output does not include the payload size.

Definition at line 125 of file foamVtkOutput.C.

References UList< T >::data_bytes(), globalIndex::localStart(), procAddr(), DynamicList< T, SizeMin >::resize_nocopy(), and UList< T >::size_bytes().

Here is the call graph for this function:

◆ writeListParallel() [3/4]

void writeListParallel ( vtk::formatter fmt,
const UList< Type > &  values,
const labelUList addressing 
)

Write a list of values via indirect addressing.

The output does not include the payload size.

Definition at line 213 of file foamVtkOutputTemplates.C.

References UList< T >::cdata_bytes(), UList< T >::data_bytes(), Foam::endl(), Foam::exit(), Foam::FatalError, FatalErrorInFunction, procAddr(), DynamicList< T, SizeMin >::resize_nocopy(), UList< T >::size(), and UList< T >::size_bytes().

Here is the call graph for this function:

◆ writeListParallel() [4/4]

void writeListParallel ( vtk::formatter fmt,
const UList< Type > &  values,
const bitSet selected 
)

Write a list of values via indirect addressing.

The output does not include the payload size.

Definition at line 274 of file foamVtkOutputTemplates.C.

References UList< T >::cdata_bytes(), UList< T >::data_bytes(), Foam::endl(), Foam::exit(), Foam::FatalError, FatalErrorInFunction, procAddr(), DynamicList< T, SizeMin >::resize_nocopy(), UList< T >::size(), UList< T >::size_bytes(), and Foam::subset().

Here is the call graph for this function:

◆ writeListsParallel() [1/2]

void writeListsParallel ( vtk::formatter fmt,
const UList< Type > &  values1,
const UList< Type > &  values2 
)

Write a list of values and another list of values.

The output does not include the payload size.

Definition at line 335 of file foamVtkOutputTemplates.C.

References UList< T >::cdata_bytes(), UList< T >::data_bytes(), Foam::endl(), Foam::exit(), Foam::FatalError, FatalErrorInFunction, globalIndex::localSize(), max(), globalIndex::maxNonLocalSize(), DynamicList< T, SizeMin >::resize_nocopy(), UList< T >::size(), UList< T >::size_bytes(), and globalIndex::subProcs().

Referenced by internalWriter::write().

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

◆ writeListsParallel() [2/2]

void writeListsParallel ( 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.

The output does not include the payload size.

Definition at line 415 of file foamVtkOutputTemplates.C.

References UList< T >::cdata_bytes(), UList< T >::data_bytes(), Foam::endl(), Foam::exit(), Foam::FatalError, FatalErrorInFunction, globalIndex::localSize(), max(), globalIndex::maxNonLocalSize(), DynamicList< T, SizeMin >::resize_nocopy(), UList< T >::size(), UList< T >::size_bytes(), and globalIndex::subProcs().

Here is the call graph for this function:

◆ write< label >()

void write< label > ( vtk::formatter fmt,
const label &  val,
const label  n 
)
inline

Template specialization for label.

Definition at line 37 of file foamVtkOutputI.H.

References n, and formatter::write().

Here is the call graph for this function:

◆ write< float >()

void write< float > ( vtk::formatter fmt,
const float &  val,
const label  n 
)
inline

Template specialization for float.

Definition at line 48 of file foamVtkOutputI.H.

References n, and formatter::write().

Here is the call graph for this function:

◆ write< double >()

void write< double > ( vtk::formatter fmt,
const double &  val,
const label  n 
)
inline

Template specialization for double.

Definition at line 59 of file foamVtkOutputI.H.

References n, and formatter::write().

Here is the call graph for this function:

◆ write() [2/2]

void write ( vtk::formatter fmt,
const symmTensor val,
const label  n 
)
inline

Template specialization for symmTensor ordering.

VTK order is (XX, YY, ZZ, XY, YZ, XZ)

Definition at line 71 of file foamVtkOutputI.H.

References Foam::component(), n, formatter::write(), SymmTensor< scalar >::XX, SymmTensor< scalar >::XY, SymmTensor< scalar >::XZ, SymmTensor< scalar >::YY, SymmTensor< scalar >::YZ, and SymmTensor< scalar >::ZZ.

Here is the call graph for this function:

◆ writeTopoSet()

bool writeTopoSet ( const polyMesh mesh,
const topoSet set,
const vtk::outputOptions  opts,
const fileName file,
bool  parallel = Pstream::parRun() 
)

Dispatch to vtk::writeCellSetFaces, vtk::writeFaceSet, vtk::writePointSet.

The file name is with/without an extension.

Returns
True on successful dispatch

Definition at line 37 of file foamVtkWriteTopoSet.C.

References Foam::endl(), mesh, Foam::nl, and WarningInFunction.

Here is the call graph for this function:

◆ writeFaceSet()

bool writeFaceSet ( const polyMesh mesh,
const faceSet set,
const vtk::outputOptions  opts,
const fileName file,
bool  parallel = Pstream::parRun() 
)

Write faceSet as VTK polydata file.

Only one CELL_DATA, which is the original faceID The file name is with/without an extension.

————————————————————————

Definition at line 36 of file foamVtkWriteFaceSet.C.

References globalIndex::localStart(), mesh, and writer().

Here is the call graph for this function:

◆ writeCellSetFaces()

bool writeCellSetFaces ( const polyMesh mesh,
const cellSet set,
const vtk::outputOptions  opts,
const fileName file,
bool  parallel = Pstream::parRun() 
)

Write perimeter faces of cellset to vtk polydata file.

The data are the original cell ids The file name is with/without an extension.

————————————————————————

————————————————————————

————————————————————————

Definition at line 36 of file foamVtkWriteCellSetFaces.C.

References forAll, HashTable< T, Key, Hash >::insert(), globalIndex::localStart(), mesh, HashTable< T, Key, Hash >::sortedToc(), and writer().

Here is the call graph for this function:

◆ writePointSet()

bool writePointSet ( const polyMesh mesh,
const pointSet set,
const vtk::outputOptions  opts,
const fileName file,
bool  parallel = Pstream::parRun() 
)

Write pointSet to VTK polydata file.

Only one CELL_DATA, which is the original pointID The file name is with/without an extension.

————————————————————————

————————————————————————

Definition at line 37 of file foamVtkWritePointSet.C.

References outputOptions::append(), format(), fileName::hasExt(), outputOptions::legacy(), fileName::lessExt(), mesh, mkDir(), outputOptions::newFormatter(), fileName::path(), pointLabels(), and reduce().

Here is the call graph for this function:

Variable Documentation

◆ fileExtension

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

File extension (without ".") for some vtk XML file content types.

Referenced by vtmWriter::append(), vtmWriter::ext(), outputOptions::ext(), surfaceFieldWriter::ext(), lagrangianWriter::ext(), and fileWriter::open().

◆ fileContentVersions

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

Version string for some vtk XML file content types.

Referenced by formatter::beginVTKFile().

◆ fileTagNames

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

Strings corresponding to the vtk XML tags.

Referenced by formatter::beginVTKFile(), formatter::endTag(), fileWriter::exit_File(), formatter::openTag(), and formatter::tag().

◆ fileAttrNames

const Foam::Enum< Foam::vtk::fileAttr > fileAttrNames
extern

Strings corresponding to the vtk XML attributes.

Referenced by formatter::xmlAttr().

◆ dataArrayAttrNames

const Foam::Enum< Foam::vtk::dataArrayAttr > dataArrayAttrNames
extern

Strings corresponding to the vtk XML DataArray attributes.

Referenced by formatter::beginDataArray().