48#ifndef Foam_vtk_surfaceWriter_H
49#define Foam_vtk_surfaceWriter_H
74 std::reference_wrapper<const pointField> points_;
77 std::reference_wrapper<const faceList> faces_;
86 surfaceWriter(
const surfaceWriter&) =
delete;
89 void operator=(
const surfaceWriter&) =
delete;
138 virtual bool beginFile(std::string title =
"");
static bool parRun(const bool on) noexcept
Set as parallel run on/off.
A class for handling file names.
An instant of time. Contains the time value and name. Uses Foam::Time when formatting the name.
vtk::outputOptions opts() const noexcept
The output options in use.
bool parallel() const noexcept
Parallel output requested?
void writeTimeValue(scalar timeValue)
Write "TimeValue" FieldData (name as per Catalyst output).
Encapsulated combinations of output format options. This is primarily useful when defining the output...
Write faces/points (optionally with fields) as a vtp file or a legacy vtk file.
label nLocalPolys_
Local number of polys (faces).
void writeUniformValue(const label nCellValues, const word &fieldName, const Type &val)
Write a uniform field of Cell (Poly or Line) or Point values.
void writeUniform(const word &fieldName, const Type &val)
Write a uniform field of Cell (Poly) or Point values.
surfaceWriter(const pointField &pts, const faceList &faces, const vtk::outputOptions opts=vtk::formatType::INLINE_BASE64)
Construct from components (default format INLINE_BASE64).
virtual void setTime(const instant &inst)
Define a time name/value for the output.
bool writeProcIDs()
Write processor ids for each poly as CellData or for each point as PointData, depending on isPointDat...
void piece(const pointField &points, const faceList &faces)
Reset point/face references to begin a new piece.
virtual ~surfaceWriter()=default
Destructor.
void writeTimeValue()
Write the currently set time as "TimeValue" FieldData.
virtual bool writeGeometry()
Write patch topology.
surfaceWriter(const pointField &pts, const faceList &faces, const vtk::outputOptions opts, const fileName &file, bool parallel=UPstream::parRun())
Construct from components and open the file for writing.
surfaceWriter(const pointField &pts, const faceList &faces, const fileName &file, bool parallel=UPstream::parRun())
Construct from components (default format INLINE_BASE64), and open the file for writing.
virtual bool beginFile(std::string title="")
Write file header (non-collective).
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< face > faceList
List of faces.
vectorField pointField
pointField is a vectorField.