51 #ifndef Foam_vtk_PatchMeshWriter_H 52 #define Foam_vtk_PatchMeshWriter_H 182 virtual bool beginFile(std::string title =
"");
bool parallel() const noexcept
Parallel output requested?
Write OpenFOAM patches and patch fields in VTP or legacy vtk format.
A class for handling file names.
virtual bool beginCellData(label nFields=0)
Begin CellData output section for specified number of fields.
patchMeshWriter(const patchMeshWriter &)=delete
No copy construct.
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.
label nLocalPolys_
Local number of polys (faces)
virtual ~patchMeshWriter()=default
Destructor.
void operator=(const patchMeshWriter &)=delete
No copy assignment.
void writePatchIDs()
Write patch ids as CellData.
static bool & parRun() noexcept
Test if this a parallel run.
vtk::outputOptions opts() const noexcept
The output options in use.
label numberOfPoints_
The number of field points for the current Piece.
void beginPiece()
Determine sizes (nLocalPoints_, nLocalPolys_), and begin piece.
void writeUniform(const word &fieldName, const Type &val)
Write a uniform field of Cell (Face) or Point values.
Encapsulated combinations of output format options. This is primarily useful when defining the output...
label numberOfCells_
The number of field cells (faces) for the current Piece.
virtual bool beginPointData(label nFields=0)
Begin PointData for specified number of fields.
void writePolys(const label pointOffset)
Write patch faces.
bool writeProcIDs()
Write processor ids as CellData. This is no-op in serial.
word ext() const
File extension for current format type.
A class for handling words, derived from Foam::string.
label nLocalPoints_
Local number of points.
virtual bool writeGeometry()
Write patch topology.
labelList patchIDs_
The selected patch ids.
void writePoints()
Write patch points.
bool writeNeighIDs()
Write processor neighbour ids as CellData. This is no-op in serial.
word ext(vtk::fileTag contentType) const
The file extension (legacy or xml) for the given content-type.
label nLocalPolyConn_
Local connectivity count for polys (faces) == sum of face sizes.
XML inline base64, base64Formatter.
Mesh consisting of general polyhedral cells.
void writePolysLegacy(const label pointOffset)
Write patch faces, legacy format.
const polyMesh & mesh_
Reference to the OpenFOAM mesh (or subset)
const labelList & patchIDs() const noexcept
The patch IDs.
virtual bool beginFile(std::string title="")
Write file header (non-collective)