40 namespace functionObjects
49 bool Foam::functionObjects::dataCloud::writeCloud
63 const auto& currCloud = *cloudPtr;
78 currCloud.writeObjects(obrTmp);
99 const label nTotParcels =
returnReduce(nParcels, sumOp<label>());
104 Log <<
"After filtering using " << nTotParcels <<
'/' 130 Foam::functionObjects::dataCloud::dataCloud
139 precision_(
IOstream::defaultPrecision()),
155 const int padWidth =
dict.getOrDefault<
int>(
"width", 8);
158 if (padWidth < 1 || padWidth > 31)
164 printf_ =
"%0" + std::to_string(padWidth) +
"d";
171 selectClouds_.clear();
172 dict.readIfPresent(
"clouds", selectClouds_);
173 selectClouds_.uniq();
175 if (selectClouds_.empty())
180 selectClouds_.push_back(std::move(
cloudName));
184 dict.readEntry(
"field", fieldName_);
187 parcelSelect_ =
dict.subOrEmptyDict(
"selection");
192 dict.readIfPresent(
"directory", directory_);
194 if (directory_.size())
198 if (!directory_.isAbsolute())
200 directory_ = time_.globalPath()/directory_;
224 selectClouds_.empty()
225 ? mesh_.sortedNames<
cloud>()
229 if (cloudNames.empty())
234 const word timeDesc =
"_" +
241 Log <<
name() <<
" output Time: " << time_.timeName() <<
nl;
static const IOField< point > * findIOPosition(const objectRegistry &obr)
Locate the "position" IOField within object registry.
defineTypeNameAndDebug(ObukhovLength, 0)
unsigned int count(const bool on=true) const
Count number of bits set.
A class for handling file names.
A list of keyword definitions, which are a keyword followed by a number of values (eg...
constexpr char nl
The newline '\n' character (0x0a)
Ostream & endl(Ostream &os)
Add newline and flush stream.
static unsigned int defaultPrecision() noexcept
Return the default precision.
static void reduceOr(bool &value, const label communicator=worldComm)
Logical (or) reduction (MPI_AllReduce)
const Type * findObject(const word &name, const bool recursive=false) const
Return const pointer to the object of the given Type.
Ignore writing from objectRegistry::writeObject()
const Time & time() const
Return the top-level database.
bitSet parcelAddr_
The filtered parcel addressing. Eg, for the current cloud.
T returnReduce(const T &value, const BinaryOp &bop, const int tag=UPstream::msgType(), const label comm=UPstream::worldComm)
Perform reduction on a copy, using specified binary operation.
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
Macros for easy insertion into run-time selection tables.
bool read(const char *buf, int32_t &val)
Same as readInt32.
virtual bool execute()
Execute, currently does nothing.
word outputName("finiteArea-edges.obj")
virtual bool write()
Write fields.
bool mkDir(const fileName &pathName, mode_t mode=0777)
Make a directory and return an error if it could not be created.
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for expressions::valueTypeCode::INVALID.
const word cloudName(propsDict.get< word >("cloud"))
A class for handling words, derived from Foam::string.
A cloud is a registry collection of lagrangian particles.
wordList sortedNames() const
The sorted names of all objects.
bool log
Flag to write log into Info.
bool calculateFilter(const objectRegistry &obrTmp, const bool log=true)
Calculate parcel selection filter.
static word printf(const char *fmt, const PrimitiveType &val)
Use a printf-style formatter for a primitive.
const word & constant() const noexcept
Return constant name.
addToRunTimeSelectionTable(functionObject, ObukhovLength, dictionary)
An IOstream is an abstract base class for all input/output systems; be they streams, files, token lists etc.
static bool master(const label communicator=worldComm)
True if process corresponds to the master rank in the communicator.
static word outputPrefix
Directory prefix.
virtual bool read(const dictionary &dict)
Read optional controls.
Specialization of Foam::functionObject for an Foam::fvMesh, providing a reference to the Foam::fvMesh...
virtual bool read(const dictionary &dict)
Read the dataCloud specification.
const fvMesh & mesh_
Reference to the fvMesh.
Do not request registration (bool: false)