34void Foam::vtk::coordSetWriter::beginPiece()
44 const label npts = pts.size();
62 if (points_.size() < 2)
106void Foam::vtk::coordSetWriter::writePoints()
121void Foam::vtk::coordSetWriter::writeVertsLegacy()
129 const label nLocalConns = nLocalVerts_;
133 labelList vertLabels(nLocalVerts_ + nLocalConns);
135 auto iter = vertLabels.begin();
137 for (label pointi = 0; pointi < nLocalVerts_; ++pointi)
152void Foam::vtk::coordSetWriter::writeLinesLegacy()
160 label nLocalConns = nLocalPoints_;
164 labelList vertLabels(nLocalLines_ + nLocalConns);
166 auto iter = vertLabels.begin();
168 label localPointi = 0;
171 label npts = pts.size();
178 *iter++ = localPointi;
193void Foam::vtk::coordSetWriter::writeVerts()
201 const label nLocalConns = nLocalVerts_;
213 label nOffs = vertOffsets.size();
222 const uint64_t payLoad = vtk::sizeofData<label>(nOffs);
225 format().writeSize(payLoad);
237 auto iter = vertOffsets.begin();
239 for (label pointi = 0; pointi < nLocalVerts_; ++pointi)
261 label nConns = nLocalConns;
270 const uint64_t payLoad = vtk::sizeofData<label>(nConns);
273 format().writeSize(payLoad *
sizeof(label));
280 auto iter = vertLabels.begin();
282 for (label pointi = 0; pointi < nLocalVerts_; ++pointi)
305void Foam::vtk::coordSetWriter::writeLines()
313 label nLocalConns = nLocalPoints_;
325 label nOffs = vertOffsets.size();
334 const uint64_t payLoad = vtk::sizeofData<label>(nOffs);
337 format().writeSize(payLoad);
349 auto iter = vertOffsets.begin();
353 const label npts = pts.size();
378 label nConns = nLocalConns;
387 const uint64_t payLoad = vtk::sizeofData<label>(nConns);
390 format().writeSize(payLoad *
sizeof(label));
397 auto iter = vertLabels.begin();
399 label localPointi = 0;
402 label npts = pts.size();
406 *iter++ = localPointi;
441 elemOutput_(DEFAULT_ELEMENTS)
479 elemOutput_ = elemOutput;
506 if (!instant_.name().empty())
510 "time='" + instant_.name() +
"'"
549 if (!instant_.name().empty())
A list of pointers to objects of type <T>, without allocation/deallocation management of the pointers...
Base class for writing coordSet(s) and tracks with fields.
A class for handling file names.
An instant of time. Contains the time value and name. Uses Foam::Time when formatting the name.
Write as points/lines, optionally with fields, as a vtp file or a legacy vtk file.
void piece(const UPtrList< const pointField > &points)
Reset point references to begin a new piece.
void setElementType(const elemOutputType elemOutput)
Define preferred element type.
elemOutputType
Types of element output.
virtual void setTime(const instant &inst)
Define a time name/value for the output.
virtual bool open(const fileName &file, bool parallel=false)
Open file for writing. Non-parallel only.
void writeTimeValue()
Write the currently set time as "TimeValue" FieldData.
virtual bool writeGeometry()
Write patch topology.
virtual bool beginFile(std::string title="")
Write file header (non-collective)
bool legacy() const noexcept
Commonly used query.
autoPtr< vtk::formatter > format_
The VTK formatter in use (only valid on master process)
bool parallel() const noexcept
Parallel output requested?
virtual bool beginFile(std::string title="")
Write file header (non-collective)
vtk::formatter & format()
The VTK formatter in use. FatalError for off-processor.
void writeTimeValue()
Write the currently set time as "TimeValue" FieldData.
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 nLocalLines_
Local number of lines (edges)
label nLocalPolys_
Local number of polys (faces)
label nLocalPoints_
Local number of points.
label nLocalVerts_
Local number of vertices (points)
void beginLines(std::ostream &os, label nLines, label nConnectivity=0)
Emit header for LINES (with trailing newline).
void beginPoints(std::ostream &os, label nPoints)
Emit header for POINTS (with trailing newline).
void beginVerts(std::ostream &os, label nVerts, label nConnectivity=0)
Emit header for VERTICES (with trailing newline).
@ NUMBER_OF_LINES
"NumberOfLines"
@ NUMBER_OF_VERTS
"NumberOfVerts"
@ NUMBER_OF_POINTS
"NumberOfPoints"
@ CONNECTIVITY
"connectivity"
void writeList(vtk::formatter &fmt, const UList< uint8_t > &values)
Write a list of uint8_t values.
List< label > labelList
A List of labels.
vectorField pointField
pointField is a vectorField.
word format(conversionProperties.get< word >("format"))
static constexpr char open