42 Cloud<passiveParticle> parcels(mesh_, cloudName_,
false);
46 auto outIter = pts.begin();
48 for (
const auto&
p : parcels)
50 *outIter =
p.position();
58void 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);
180 "case='" + mesh_.time().globalCaseName()
181 +
"' cloud='" + cloudName_
182 +
"' time='" + mesh_.time().timeName()
183 +
"' index='" +
Foam::name(mesh_.time().timeIndex())
193 if (isState(outputState::CELL_DATA))
197 else if (isState(outputState::POINT_DATA))
205 numberOfPoints_ = cloudPoints.
size();
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();
void size(const label n)
Older name for setAddressableSize.
static const word prefix
The prefix to local: lagrangian.
A class for handling file names.
Mesh data needed to do the Finite Volume discretisation.
Base class for VTK output writers that handle geometry and fields (eg, vtp, vtu data)....
bool parallel() const noexcept
Parallel output requested?
vtk::outputOptions opts_
Requested output options.
virtual bool open(const fileName &file, bool parallel=Pstream::parRun())
Open file for writing (creates parent directory).
virtual bool beginFile(std::string title="")
Write file header (non-collective)
Write lagrangian (cloud) positions and fields (as PointData) in VTP format. Legacy VTK format is inte...
bool beginParcelData()
Begin parcel (PointData) output section.
bool endParcelData()
Explicitly end parcel (PointData) output and switch to PIECE state.
virtual bool writeGeometry()
Write cloud positions.
virtual bool beginFile(std::string title="")
Write file header (non-collective)
Encapsulated combinations of output format options. This is primarily useful when defining the output...
bool legacy() const noexcept
True if writer uses legacy file format.
bool append() const noexcept
True if output format uses an append mode.
A class for handling words, derived from Foam::string.
@ NUMBER_OF_VERTS
"NumberOfVerts"
@ NUMBER_OF_POINTS
"NumberOfPoints"
void writeIdentity(vtk::formatter &fmt, const label len, label start=0)
Write an identity list of labels.
@ CONNECTIVITY
"connectivity"
fileTag
Some common XML tags for vtk files.
void writeList(vtk::formatter &fmt, const UList< uint8_t > &values)
Write a list of uint8_t values.
void writeListParallel(vtk::formatter &fmt, const UList< Type > &values)
Write a list of values.
vectorField pointField
pointField is a vectorField.
void reduce(const List< UPstream::commsStruct > &comms, T &value, const BinaryOp &bop, const int tag, const label comm)
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for INVALID.
word format(conversionProperties.get< word >("format"))
const word cloudName(propsDict.get< word >("cloud"))