Namespace for handling VTK output. Contains classes and functions for writing VTK file content. More...
Namespaces | |
| namespace | Tools |
| A collection of static methods to assist converting OpenFOAM data structures into VTK internal data structures. | |
| namespace | legacy |
| Namespace for legacy VTK output constants and functions. | |
Classes | |
| struct | Caching |
| Bookkeeping for internal caching. More... | |
| class | vtuAdaptor |
| Bookkeeping for vtkUnstructuredGrid. More... | |
| class | GenericPatchGeoFieldsWriter |
| A Foam::vtk::GenericPatchWriter with support for geometric fields. More... | |
| class | internalWriter |
| Write an OpenFOAM volume (internal) geometry and internal fields as a vtu file or a legacy vtk file. More... | |
| class | patchWriter |
| Write OpenFOAM patches and patch fields in VTP or legacy vtk format. More... | |
| class | surfaceFieldWriter |
| Write surfaces fields (as PointData) in VTP format. Legacy VTK format is intentionally not supported. 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 | seriesWriter |
| Provides a means of accumulating and generating VTK file series. More... | |
| class | vtmWriter |
| Provides a means of accumulating file entries for generating a vtkMultiBlockDataSet (.vtm) file. More... | |
| 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... | |
| 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 | 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 | 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 | 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... | |
| class | lineWriter |
| Write edge/points (optionally with fields) as a vtp file or a legacy vtk file. More... | |
| class | polyWriter |
| Write faces/points (optionally with fields) as a vtp file or a legacy vtk file. More... | |
| class | surfaceWriter |
| Write faces/points (optionally with fields) as a vtp 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 | coordSetWriter |
| Write as points/lines, optionally with fields, as a vtp file or a legacy vtk file. More... | |
| class | internalMeshWriter |
| Write an OpenFOAM volume (internal) geometry and internal fields as a vtu file or a legacy vtk file. 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 | patchMeshWriter |
| Write OpenFOAM patches and patch fields in VTP or legacy vtk format. More... | |
Typedefs | |
| typedef GenericPatchGeoFieldsWriter< indirectPrimitivePatch > | indirectPatchGeoFieldsWriter |
| Write indirectPrimitivePatch faces/points as a vtp file or a legacy vtk file with support for geometric fields. | |
| typedef GenericPatchGeoFieldsWriter< uindirectPrimitivePatch > | uindirectPatchGeoFieldsWriter |
| Write uindirectPrimitivePatch faces/points as a vtp file or a legacy vtk file with support for geometric fields. | |
| typedef indirectPatchGeoFieldsWriter | surfaceMeshWriter |
| typedef GenericPatchWriter< indirectPrimitivePatch > | indirectPatchWriter |
| Write indirectPrimitivePatch faces/points (optionally with fields) as a vtp file or a legacy vtk file. | |
| typedef GenericPatchWriter< uindirectPrimitivePatch > | uindirectPatchWriter |
| Write uindirectPrimitivePatch faces/points (optionally with fields) as a vtp file or a legacy vtk file. | |
| typedef GenericPatchWriter< primitivePatch > | primitivePatchWriter |
| Write primitivePatch faces/points (optionally with fields) as a vtp file or a legacy vtk file. | |
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 , HDF_FORMAT = 0x40 } |
| 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 { UNKNOWN , 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 , VTK_HDF } |
| 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). | |
| bool | isLegacy (enum formatType fmt) noexcept |
| Test for vtk legacy format. | |
| bool | isHDF (enum formatType fmt) noexcept |
| Test for HDF format. | |
| template<class Type, direction nComp = 1> | |
| uint64_t | sizeofData (label count) |
| Commonly used calculation for header and payload sizes. | |
| autoPtr< vtk::formatter > | newFormatter (std::ostream &os, unsigned prec=IOstream::defaultPrecision()) |
| Return a default asciiFormatter. | |
| autoPtr< vtk::formatter > | newFormatter (std::ostream &os, const enum formatType fmtType, unsigned prec=IOstream::defaultPrecision()) |
| Return a new formatter based on the specified format type. | |
| void | writeIdentity (vtk::formatter &fmt, const label len, label start=0) |
| Write an identity list of labels. | |
| void | writeList (vtk::formatter &fmt, const UList< uint8_t > &values) |
| Write a list of uint8_t values. | |
| template<class Type> | |
| void | write (vtk::formatter &fmt, const Type &val, const label n=1) |
| Component-wise write of a value (N times). | |
| 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. | |
| template<class Type> | |
| void | writeList (vtk::formatter &fmt, const UList< Type > &values) |
| Write a list of values. | |
| template<class Type, unsigned N> | |
| void | writeList (vtk::formatter &fmt, const FixedList< Type, N > &values) |
| Write a list of values. | |
| template<class Type> | |
| void | writeList (vtk::formatter &fmt, const UList< Type > &values, const labelUList &addressing) |
| Write a list of values via indirect addressing. | |
| template<class Type> | |
| void | writeList (vtk::formatter &fmt, const UList< Type > &values, const bitSet &selected) |
| Write a list of values via indirect addressing. | |
| 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. | |
| template<class Type> | |
| void | writeListParallel (vtk::formatter &fmt, const UList< Type > &values) |
| Write a list of values. | |
| void | writeListParallel (vtk::formatter &fmt, const UList< label > &values, const globalIndex &procOffset) |
| Write a list of values, with constant per-processor offset. | |
| template<class Type> | |
| void | writeListParallel (vtk::formatter &fmt, const UList< Type > &values, const labelUList &addressing) |
| Write a list of values via indirect addressing. | |
| template<class Type> | |
| void | writeListParallel (vtk::formatter &fmt, const UList< Type > &values, const bitSet &selected) |
| Write a list of values via indirect addressing. | |
| 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. | |
| 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. | |
| bool | writeTopoSet (const polyMesh &mesh, const topoSet &set, const vtk::outputOptions opts, const fileName &file, bool parallel=UPstream::parRun()) |
| Dispatch to vtk::writeCellSetFaces, vtk::writeFaceSet, vtk::writePointSet. | |
| bool | writeFaceSet (const polyMesh &mesh, const faceSet &set, const vtk::outputOptions opts, const fileName &file, bool parallel=UPstream::parRun()) |
| Write faceSet as VTK polydata file. | |
| bool | writeCellSetFaces (const polyMesh &mesh, const cellSet &set, const vtk::outputOptions opts, const fileName &file, bool parallel=UPstream::parRun()) |
| Write perimeter faces of cellset to vtk polydata file. | |
| bool | writePointSet (const polyMesh &mesh, const pointSet &set, const vtk::outputOptions opts, const fileName &file, bool parallel=UPstream::parRun()) |
| Write pointSet to VTK polydata file. | |
Variables | |
| const Foam::Enum< fileTag > | fileExtension |
| File extension (without ".") for some vtk XML file content types. | |
| const Foam::Enum< fileTag > | fileContentVersions |
| Version string for some vtk XML file content types. | |
| const Foam::Enum< fileTag > | fileTagNames |
| Strings corresponding to the vtk XML tags. | |
| const Foam::Enum< fileAttr > | fileAttrNames |
| Strings corresponding to the vtk XML attributes. | |
| const Foam::Enum< dataArrayAttr > | dataArrayAttrNames |
| Strings corresponding to the vtk XML DataArray attributes. | |
Write indirectPrimitivePatch faces/points as a vtp file or a legacy vtk file with support for geometric fields.
Definition at line 59 of file foamVtkIndPatchGeoFieldsWriter.H.
Write uindirectPrimitivePatch faces/points as a vtp file or a legacy vtk file with support for geometric fields.
Definition at line 63 of file foamVtkIndPatchGeoFieldsWriter.H.
Definition at line 37 of file foamVtkSurfaceMeshWriter.H.
Write indirectPrimitivePatch faces/points (optionally with fields) as a vtp file or a legacy vtk file.
Definition at line 57 of file foamVtkIndPatchWriter.H.
Write uindirectPrimitivePatch faces/points (optionally with fields) as a vtp file or a legacy vtk file.
Definition at line 61 of file foamVtkIndPatchWriter.H.
Write primitivePatch faces/points (optionally with fields) as a vtp file or a legacy vtk file.
Definition at line 49 of file foamVtkPrimitivePatchWriter.H.
| 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 75 of file foamVtkCore.H.
|
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. |
| HDF_FORMAT | VTKHDF format. |
Definition at line 88 of file foamVtkCore.H.
| enum cellType : uint8_t |
Equivalent to enumeration in "vtkCellType.h" (should be uint8_t).
Definition at line 127 of file foamVtkCore.H.
|
strong |
Some common XML tags for vtk files.
Definition at line 153 of file foamVtkCore.H.
|
strong |
Some common XML attributes for vtk files.
Definition at line 193 of file foamVtkCore.H.
|
strong |
Some common names for XML DataArray entries.
| Enumerator | |
|---|---|
| POINTS | "Points" |
| OFFSETS | "offsets" |
| CONNECTIVITY | "connectivity" |
| TYPES | "types" |
| FACES | "faces" |
| FACEOFFSETS | "faceoffsets" |
Definition at line 213 of file foamVtkCore.H.
|
inlinenoexcept |
Test for vtk append format (xml).
Definition at line 102 of file foamVtkCore.H.
|
inlinenoexcept |
Test for vtk legacy format.
Definition at line 110 of file foamVtkCore.H.
|
inlinenoexcept |
|
inline |
Commonly used calculation for header and payload sizes.
Definition at line 730 of file foamVtkFormatter.H.
Referenced by VTPsurfaceFormat< Face >::write(), VTPsurfaceFormatCore::writeCellData(), VTPsurfaceFormatCore::writeCellData(), lumpedPointMovement::writeForcesAndMomentsVTP(), VTPsurfaceFormatCore::writeHeader(), and lumpedPointState::writeVTP().

| autoPtr< vtk::formatter > newFormatter | ( | std::ostream & | os, |
| unsigned | prec = IOstream::defaultPrecision() ) |
Return a default asciiFormatter.
References IOstream::defaultPrecision(), and os().
Referenced by outputOptions::newFormatter(), lumpedPointMovement::writeForcesAndMomentsVTP(), and lumpedPointState::writeVTP().


| autoPtr< vtk::formatter > newFormatter | ( | std::ostream & | os, |
| const enum formatType | fmtType, | ||
| unsigned | prec = IOstream::defaultPrecision() ) |
Return a new formatter based on the specified format type.
References IOstream::defaultPrecision(), and os().

| 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.
Referenced by lumpedPointMovement::writeForcesAndMomentsVTP(), and lumpedPointState::writeVTP().

| 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.
Referenced by VTKsurfaceFormat< Face >::write(), VTPsurfaceFormat< Face >::write(), VTKsurfaceFormatCore::writeCellData(), VTPsurfaceFormatCore::writeCellData(), lumpedPointMovement::writeForcesAndMomentsVTP(), VTKsurfaceFormatCore::writeHeader(), VTPsurfaceFormatCore::writeHeader(), and lumpedPointState::writeVTP().

|
inline |
Component-wise write of a value (N times).
References n.
Referenced by VTKsurfaceFormatCore::writeCellData(), VTPsurfaceFormatCore::writeCellData(), and lumpedPointState::writeVTP().

|
inline |
Component-wise write of a value (N times) in parallel.
The value and count may differ on each processor
| void writeList | ( | vtk::formatter & | fmt, |
| const UList< Type > & | values ) |
Write a list of values.
The output does not include the payload size.
| void writeList | ( | vtk::formatter & | fmt, |
| const FixedList< Type, N > & | values ) |
Write a list of values.
The output does not include the payload size.
| 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.
| 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.
| 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.
| void writeListParallel | ( | vtk::formatter & | fmt, |
| const UList< Type > & | values ) |
Write a list of values.
The output does not include the payload size.
| 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.
| procOffset | The per-processor offset (needed on master only) |
| 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.
| 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.
| 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.
| 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.
| bool writeTopoSet | ( | const polyMesh & | mesh, |
| const topoSet & | set, | ||
| const vtk::outputOptions | opts, | ||
| const fileName & | file, | ||
| bool | parallel = UPstream::parRun() ) |
Dispatch to vtk::writeCellSetFaces, vtk::writeFaceSet, vtk::writePointSet.
The file name is with/without an extension.
References mesh, and UPstream::parRun().

| bool writeFaceSet | ( | const polyMesh & | mesh, |
| const faceSet & | set, | ||
| const vtk::outputOptions | opts, | ||
| const fileName & | file, | ||
| bool | parallel = UPstream::parRun() ) |
Write faceSet as VTK polydata file.
Only one CELL_DATA, which is the original faceID The file name is with/without an extension.
References mesh, and UPstream::parRun().

| bool writeCellSetFaces | ( | const polyMesh & | mesh, |
| const cellSet & | set, | ||
| const vtk::outputOptions | opts, | ||
| const fileName & | file, | ||
| bool | parallel = UPstream::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.
References mesh, and UPstream::parRun().

| bool writePointSet | ( | const polyMesh & | mesh, |
| const pointSet & | set, | ||
| const vtk::outputOptions | opts, | ||
| const fileName & | file, | ||
| bool | parallel = UPstream::parRun() ) |
Write pointSet to VTK polydata file.
Only one CELL_DATA, which is the original pointID The file name is with/without an extension.
References mesh, and UPstream::parRun().

|
extern |
File extension (without ".") for some vtk XML file content types.
Referenced by lagrangianWriter::ext(), outputOptions::ext(), surfaceFieldWriter::ext(), and vtmWriter::ext().
|
extern |
Version string for some vtk XML file content types.
Referenced by formatter::beginVTKFile(), and formatter::beginVTKFile().
|
extern |
Strings corresponding to the vtk XML tags.
Referenced by formatter::beginVTKFile(), formatter::beginVTKFile(), formatter::beginVTKFile(), formatter::endTag(), formatter::openTag(), and formatter::tag().
|
extern |
Strings corresponding to the vtk XML attributes.
Referenced by formatter::xmlAttr(), formatter::xmlAttr(), formatter::xmlAttr(), formatter::xmlAttr(), and formatter::xmlAttr().
|
extern |
Strings corresponding to the vtk XML DataArray attributes.
Referenced by formatter::beginDataArray().