86 label nLocalParcels(0);
92 nLocalParcels = parcelsPtr().size();
98 if (Pstream::master())
101 os.beginParticleCoordinates(nTotParcels);
115 positions.
reserve(Pstream::master() ?
procAddr.maxSize() : nLocalParcels);
120 const auto& parcels = *parcelsPtr;
122 positions.resize_nocopy(parcels.size());
124 auto outIter = positions.begin();
128 *outIter =
p.position();
132 parcelsPtr.
reset(
nullptr);
135 if (Pstream::master())
138 const bool isBinaryOutput = (
os.format() == IOstream::BINARY);
147 for (label
id = 1;
id <= nTotParcels; ++id)
165 for (
const label proci :
procAddr.subProcs())
167 positions.resize_nocopy(
procAddr.localSize(proci));
170 UPstream::commsTypes::scheduled,
172 positions.data_bytes(),
173 positions.size_bytes()
191 UPstream::commsTypes::scheduled,
192 UPstream::masterNo(),
193 positions.cdata_bytes(),
194 positions.size_bytes()
globalIndex procAddr(aMesh.nFaces())
Base cloud calls templated on particle type.
A 1D vector of objects of type <T> that resizes itself as necessary to accept the new objects.
void reserve(const label len)
virtual Ostream & write(const char c)
Write character.
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
void reset(autoPtr< T > &&other) noexcept
Delete managed object and set to new given pointer.
Ensight output with specialized write() for strings, integers and floats. Correctly handles binary wr...
Mesh data needed to do the Finite Volume discretisation.
Calculates a unique integer (label so might not have enough room - 2G max) for processor + local inde...
A class for handling words, derived from Foam::string.
A collection of functions for writing clouds as ensight file content.
OBJstream os(runTime.globalPath()/outputName)
bool writeCloudPositions(const fvMesh &mesh, const word &cloudName, bool exists, autoPtr< ensightFile > &output)
Write cloud positions.
static label writeMeasured_ascii(ensightFile &os, label pointId, const UList< point > &points)
ASCII output. Id + position together.
bool exists(const fileName &name, const bool checkGzip=true, const bool followLink=true)
Does the name exist (as DIRECTORY or FILE) in the file system?
static void writeMeasured_binary(ensightFile &os, const UList< point > &points)
Binary output.
T returnReduce(const T &value, const BinaryOp &bop, const int tag=UPstream::msgType(), const label comm=UPstream::worldComm)
Reduce (copy) and return value.
const word cloudName(propsDict.get< word >("cloud"))