35template<
class ParcelType>
40template<
class ParcelType>
49template<
class ParcelType>
80template<
class ParcelType>
81template<
class CloudType>
84 const bool readOnProc = c.size();
86 ParcelType::readFields(c);
93 c.checkFieldIOobject(c, UCorrect);
98 p.UCorrect_ = UCorrect[i];
105template<
class ParcelType>
106template<
class CloudType>
109 ParcelType::writeFields(c);
111 const label np = c.size();
112 const bool writeOnProc = c.size();
118 for (
const MPPICParcel<ParcelType>&
p : c)
120 UCorrect[i] =
p.UCorrect();
125 UCorrect.write(writeOnProc);
129template<
class ParcelType>
133 const wordRes& filters,
138 ParcelType::writeProperties(
os, filters, delim, namesOnly);
141 #define writeProp(Name, Value) \
142 ParcelType::writeProperty(os, Name, Value, namesOnly, delim, filters)
150template<
class ParcelType>
151template<
class CloudType>
158 ParcelType::readObjects(c, obr);
161 if (!c.size())
return;
168 p.UCorrect() = UCorrect[i];
175template<
class ParcelType>
176template<
class CloudType>
183 ParcelType::writeObjects(c, obr);
185 const label np = c.size();
191 for (
const MPPICParcel<ParcelType>&
p : c)
193 UCorrect[i] =
p.UCorrect();
202template<
class ParcelType>
203Foam::Ostream& Foam::operator<<
219 reinterpret_cast<const char*
>(&
p.UCorrect_),
Useful combination of include files which define Sin, Sout and Serr and the use of IO streams general...
A primitive field of type <T> with automated input and output.
@ NO_READ
Nothing to be read.
@ MUST_READ
Reading required.
streamFormat format() const noexcept
Get the current stream format.
@ ASCII
"ascii" (normal default)
virtual bool check(const char *operation) const
Check IOstream status for given operation.
bool fatalCheckNativeSizes(const char *operation) const
Assert that the label/scalar byte-size associated with the stream are the native label/scalar sizes.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
virtual Istream & read(token &)=0
Return next token from stream.
Wrapper around kinematic parcel types to add MPPIC modelling.
const vector & UCorrect() const
Return const access to correction velocity.
static void writeObjects(const CloudType &c, objectRegistry &obr)
Write particle fields as objects into the obr registry.
static const std::size_t sizeofFields
Size in bytes of the fields.
MPPICParcel(const polyMesh &mesh, const barycentric &coordinates, const label celli, const label tetFacei, const label tetPti)
Construct from mesh, coordinates and topology.
static void readObjects(CloudType &c, const objectRegistry &obr)
Read particle fields as objects from the obr registry.
static void writeFields(const CloudType &c)
Write.
vector UCorrect_
Velocity correction due to collisions [m/s].
void writeProperties(Ostream &os, const wordRes &filters, const word &delim, const bool namesOnly=false) const
Write individual parcel properties to stream.
static void readFields(CloudType &c)
Read.
virtual Ostream & write(const char c) override
Write character.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
static const IOField< Type > & lookupIOField(const word &fieldName, const objectRegistry &obr)
Lookup an IOField within object registry.
static IOField< Type > & createIOField(const word &fieldName, const label nParticle, objectRegistry &obr)
Helper to construct IOField on a supplied object registry.
Registry of regIOobjects.
Mesh consisting of general polyhedral cells.
A class for handling character strings derived from std::string.
A List of wordRe with additional matching capabilities.
A class for handling words, derived from Foam::string.
OBJstream os(runTime.globalPath()/outputName)
#define writeProp(Name, Value)
DSMCCloud< dsmcParcel > CloudType
static constexpr const zero Zero
Global zero (0).