42 Cloud<passiveParticle> parcels(mesh_, cloudName_,
false);
46 auto outIter =
pts.begin();
48 for (
const auto&
p : parcels)
50 *outIter =
p.position();
58 void Foam::vtk::lagrangianWriter::writeVerts()
63 const label nVerts = numberOfPoints_;
66 const uint64_t payLoad = vtk::sizeofData<label>(nVerts);
77 format().writeSize(payLoad);
91 format().writeSize(payLoad);
105 return enter_CellData(numberOfPoints_, nFields);
111 return enter_PointData(numberOfPoints_, nFields);
117 Foam::vtk::lagrangianWriter::lagrangianWriter
136 Foam::vtk::lagrangianWriter::lagrangianWriter
146 open(file, parallel);
150 Foam::vtk::lagrangianWriter::lagrangianWriter
161 open(file, parallel);
180 "case='" + mesh_.time().globalCaseName()
181 +
"' cloud='" + cloudName_
182 +
"' time='" + mesh_.time().timeName()
183 +
"' index='" +
Foam::name(mesh_.time().timeIndex())
205 numberOfPoints_ = cloudPoints.size();
209 reduce(numberOfPoints_, sumOp<label>());
242 const uint64_t payLoad =
243 vtk::sizeofData<float,3>(numberOfPoints_);
248 format().writeSize(payLoad);
272 if (useVerts_) writeVerts();
295 return endCellData();
299 return endPointData();
virtual bool beginCellData(label nFields=0)
Begin CellData output section for specified number of fields.
bool beginParcelData()
Begin parcel (PointData) output section.
A class for handling file names.
bool endParcelData()
Explicitly end parcel (PointData) output and switch to PIECE state.
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.
void beginPointData(vtk::formatter &fmt, label nPoints, label nFields)
Emit legacy POINT_DATA nPoints, FIELD FieldData nFields.
bool legacy() const noexcept
Commonly used query.
Encapsulated combinations of output format options. This is primarily useful when defining the output...
virtual bool beginPointData(label nFields=0)
Begin PointData for specified number of fields.
vectorField pointField
pointField is a vectorField.
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for INVALID.
const word cloudName(propsDict.get< word >("cloud"))
A class for handling words, derived from Foam::string.
void writeIdentity(vtk::formatter &fmt, const label len, label start=0)
Write an identity list of labels.
void beginCellData(vtk::formatter &fmt, label nCells, label nFields)
Emit legacy CELL_DATA nCells, FIELD FieldData nFields.
void writeList(vtk::formatter &fmt, const UList< uint8_t > &values)
Write a list of uint8_t values.
word format(conversionProperties.get< word >("format"))
virtual bool beginFile(std::string title="")
Write file header (non-collective)
fileTag
Some common XML tags for vtk files.
Mesh data needed to do the Finite Volume discretisation.
void reduce(const List< UPstream::commsStruct > &comms, T &value, const BinaryOp &bop, const int tag, const label comm)
Reduce inplace (cf. MPI Allreduce) using specified communication schedule.
void writeListParallel(vtk::formatter &fmt, const UList< Type > &values)
Write a list of values.
Write lagrangian (cloud) positions and fields (as PointData) in VTP format. Legacy VTK format is inte...
virtual bool beginFile(std::string title="")
Write file header (non-collective)
virtual bool writeGeometry()
Write cloud positions.
static const word prefix
The prefix to local: lagrangian.