51#ifndef Foam_vtk_PatchMeshWriter_H
52#define Foam_vtk_PatchMeshWriter_H
180 virtual bool beginFile(std::string title =
"");
235 #include "foamVtkPatchMeshWriter.txx"
A tuple of integers comprising start, size, total.
IntType total() const noexcept
The total size.
static bool parRun(const bool on) noexcept
Set as parallel run on/off.
A class for handling file names.
Mesh consisting of general polyhedral cells.
Base class for VTK output writers that handle geometry and fields (eg, vtp, vtu data)....
vtk::outputOptions opts() const noexcept
The output options in use.
bool parallel() const noexcept
Parallel output requested?
word ext() const
File extension for current format type.
Encapsulated combinations of output format options. This is primarily useful when defining the output...
void writeUniform(const word &fieldName, const Type &val)
Write a uniform field of Cell (Face) or Point values.
bool writeNeighIDs()
Write processor neighbour ids as CellData. This is no-op in serial.
virtual ~patchMeshWriter()=default
Destructor.
patchMeshWriter(const polyMesh &mesh, const labelUList &patchIDs, const fileName &file, bool parallel=UPstream::parRun())
Construct from components (default format INLINE_BASE64), and open the file for writing.
patchMeshWriter(const polyMesh &mesh, const labelUList &patchIDs, const vtk::outputOptions opts, const fileName &file, bool parallel=UPstream::parRun())
Construct from components and open the file for writing.
virtual bool beginCellData(label nFields=0)
Begin CellData output section for specified number of fields.
void beginPiece()
Determine sizes and begin piece.
const labelList & patchIDs() const noexcept
The patch IDs.
static word ext(vtk::outputOptions opts)
File extension for given output type.
bool writeProcIDs()
Write processor ids for each line as CellData or for each point as PointData, depending on isPointDat...
void operator=(const patchMeshWriter &)=delete
No copy assignment.
virtual bool beginPointData(label nFields=0)
Begin PointData for specified number of fields.
patchMeshWriter(const polyMesh &mesh, const labelUList &patchIDs, const vtk::outputOptions opts=vtk::formatType::INLINE_BASE64)
Construct from components (default format INLINE_BASE64).
OffsetRange< label > cellSlab_
Slab addressing for field cells (faces) for the current Piece.
word ext() const
File extension for current format type.
void writePoints()
Write patch points.
patchMeshWriter(const patchMeshWriter &)=delete
No copy construct.
void writePolys()
Write patch faces.
void writePatchIDs()
Write patch ids as CellData.
label nTotalPoints() const noexcept
Total number of field points for the current Piece.
virtual bool writeGeometry()
Write patch topology.
OffsetRange< label > connectivitySlab_
Slab addressing for cell (face) connectivity count, which is just the sum of the face sizes.
const polyMesh & mesh_
Reference to the OpenFOAM mesh (or subset).
label nTotalCells() const noexcept
Total number of field cells (faces) for the current Piece.
OffsetRange< label > pointSlab_
Slab addressing for field points of the current Piece.
virtual bool beginFile(std::string title="")
Write file header (non-collective).
void writePolys_legacy()
Write patch faces, legacy format.
labelList patchIDs_
The selected patch ids.
A class for handling words, derived from Foam::string.
Namespace for handling VTK output. Contains classes and functions for writing VTK file content.
@ INLINE_BASE64
XML inline base64, base64Formatter.
List< label > labelList
A List of labels.
UList< label > labelUList
A UList of labels.