40namespace functionObjects
49bool Foam::functionObjects::dataCloud::writeCloud
74 objPtr->writeObjects(obrTmp);
85 reduce(applyFilter_, orOp<bool>());
92 const label nTotParcels =
returnReduce(nParcels, sumOp<label>());
97 Log <<
"After filtering using " << nTotParcels <<
'/'
132 precision_(
IOstream::defaultPrecision()),
148 const int padWidth =
dict.getOrDefault<
int>(
"width", 8);
151 if (padWidth < 1 || padWidth > 31)
157 printf_ =
"%0" + std::to_string(padWidth) +
"d";
164 selectClouds_.clear();
165 dict.readIfPresent(
"clouds", selectClouds_);
167 if (selectClouds_.empty())
169 selectClouds_.resize(1);
170 selectClouds_.first() =
174 dict.readEntry(
"field", fieldName_);
177 parcelSelect_ =
dict.subOrEmptyDict(
"selection");
182 dict.readIfPresent(
"directory", directory_);
184 if (directory_.size())
188 if (!directory_.isAbsolute())
190 directory_ = time_.globalPath()/directory_;
212 const wordList cloudNames(mesh_.sortedNames<
cloud>(selectClouds_));
214 if (cloudNames.
empty())
219 const word timeDesc =
"_" +
226 Log <<
name() <<
" output Time: " << time_.timeName() <<
nl;
Macros for easy insertion into run-time selection tables.
#define addToRunTimeSelectionTable(baseType, thisType, argNames)
Add to construction table with typeName as the key.
bitSet parcelAddr_
The filtered parcel addressing. Eg, for the current cloud.
bool calculateFilter(const objectRegistry &obrTmp, const bool log=true)
Calculate parcel selection filter.
An IOstream is an abstract base class for all input/output systems; be they streams,...
static unsigned int defaultPrecision() noexcept
Return the default precision.
virtual bool read()
Re-read model coefficients if they have changed.
const word & constant() const
Return constant name.
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
bool empty() const noexcept
True if the UList is empty (ie, size() is zero)
unsigned int count(const bool on=true) const
Count number of bits set.
A cloud is a registry collection of lagrangian particles.
static const IOField< point > * findIOPosition(const objectRegistry &obr)
Locate the "position" IOField within object registry.
static word defaultName
The default cloud name: defaultCloud.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
A class for handling file names.
Abstract base-class for Time/database function objects.
static word outputPrefix
Directory prefix.
This functionObject writes a cloud position and in ASCII.
virtual bool read(const dictionary &dict)
Read the dataCloud specification.
virtual bool execute()
Execute, currently does nothing.
virtual bool write()
Write fields.
Specialization of Foam::functionObject for an Foam::fvMesh, providing a reference to the Foam::fvMesh...
const fvMesh & mesh_
Reference to the fvMesh.
const Time & time() const
Return the top-level database.
const Type * findObject(const word &name, const bool recursive=false) const
Return const pointer to the object of the given Type.
splitCell * master() const
A class for handling words, derived from Foam::string.
static word printf(const char *fmt, const PrimitiveType &val)
Use a printf-style formatter for a primitive.
#define defineTypeNameAndDebug(Type, DebugSwitch)
Define the typeName and debug information.
word outputName("finiteArea-edges.obj")
bool mkDir(const fileName &pathName, mode_t mode=0777)
Make a directory and return an error if it could not be created.
Ostream & endl(Ostream &os)
Add newline and flush stream.
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.
T returnReduce(const T &value, const BinaryOp &bop, const int tag=UPstream::msgType(), const label comm=UPstream::worldComm)
Reduce (copy) and return value.
constexpr char nl
The newline '\n' character (0x0a)
const word cloudName(propsDict.get< word >("cloud"))