51 #ifndef Foam_vtk_PatchMeshWriter_H 52 #define Foam_vtk_PatchMeshWriter_H 180 virtual bool beginFile(std::string title =
"");
235 #include "foamVtkPatchMeshWriter.txx" bool parallel() const noexcept
Parallel output requested?
Write OpenFOAM patches and patch fields in VTP or legacy vtk format.
label nTotalCells() const noexcept
Total number of field cells (faces) for the current Piece.
A class for handling file names.
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.
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.
IntType total() const noexcept
The total size.
virtual bool beginFile(std::string title="")
Write file header (non-collective)
virtual bool beginPointData(label nFields=0)
Begin PointData for specified number of fields.
void beginPiece()
Determine sizes 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...
void writePolys_legacy()
Write patch faces, legacy format.
OffsetRange< label > pointSlab_
Slab addressing for field points of the current Piece.
virtual bool beginCellData(label nFields=0)
Begin CellData output section for specified number of fields.
void writePolys()
Write patch faces.
bool writeProcIDs()
Write processor ids for each line as CellData or for each point as PointData, depending on isPointDat...
word ext() const
File extension for current format type.
A class for handling words, derived from Foam::string.
OffsetRange< label > connectivitySlab_
Slab addressing for cell (face) connectivity count, which is just the sum of the face sizes...
label nTotalPoints() const noexcept
Total number of field points for the current Piece.
labelList patchIDs_
The selected patch ids.
OffsetRange< label > cellSlab_
Slab addressing for field cells (faces) for the current Piece.
void writePoints()
Write patch points.
bool writeNeighIDs()
Write processor neighbour ids as CellData. This is no-op in serial.
virtual bool writeGeometry()
Write patch topology.
XML inline base64, base64Formatter.
Mesh consisting of general polyhedral cells.
const word & ext(vtk::fileTag contentType) const
The file extension (legacy or xml) for the given content-type.
const polyMesh & mesh_
Reference to the OpenFOAM mesh (or subset)
const labelList & patchIDs() const noexcept
The patch IDs.