33 template<
class ParcelType>
37 template<
class ParcelType>
40 sizeof(MomentumParcel<ParcelType>)
41 - offsetof(MomentumParcel<ParcelType>, moving_)
47 template<
class ParcelType>
79 is.
read(
reinterpret_cast<char*
>(&
moving_), sizeofFields_);
86 "MomentumParcel<ParcelType>::MomentumParcel"
87 "(const polyMesh&, Istream&, bool)"
92 template<
class ParcelType>
93 template<
class CloudType>
105 c.checkFieldIOobject(
c, moving);
112 c.checkFieldIOobject(
c, typeId);
119 c.checkFieldIOobject(
c, nParticle);
126 c.checkFieldIOobject(
c, d);
133 c.checkFieldIOobject(
c, dTarget);
140 c.checkFieldIOobject(
c,
U);
147 c.checkFieldIOobject(
c,
rho);
154 c.checkFieldIOobject(
c, age);
161 c.checkFieldIOobject(
c, tTurb);
168 c.checkFieldIOobject(
c, UTurb);
176 p.moving_ = moving[i];
177 p.typeId_ = typeId[i];
178 p.nParticle_ = nParticle[i];
180 p.dTarget_ = dTarget[i];
192 template<
class ParcelType>
193 template<
class CloudType>
196 ParcelType::writeFields(
c);
221 moving[i] =
p.moving();
222 typeId[i] =
p.typeId();
223 nParticle[i] =
p.nParticle();
225 dTarget[i] =
p.dTarget();
229 tTurb[i] =
p.tTurb();
230 UTurb[i] =
p.UTurb();
235 const bool write = np > 0;
252 template<
class ParcelType>
261 os << static_cast<const ParcelType&>(
p)
275 os << static_cast<const ParcelType&>(
p);
278 reinterpret_cast<const char*
>(&
p.moving_),
279 MomentumParcel<ParcelType>::sizeofFields_
286 "Ostream& operator<<(Ostream&, const MomentumParcel<ParcelType>&)"
Useful combination of include files which define Sin, Sout and Serr and the use of IO streams general...
#define forAllIter(Container, container, iter)
Iterate across all elements in the container object of type.
#define forAllConstIter(Container, container, iter)
Iterate across all elements in the container object of type.
Templated base class for dsmc cloud.
A primitive field of type <Type> with automated input and output.
streamFormat format() const
Return current stream format.
virtual bool check(const char *operation) const
Check IOstream status for given operation.
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.
Momentum parcel class with rotational motion (as spherical particles only) and one/two-way coupling w...
label typeId_
Parcel type id.
vector UTurb_
Turbulent velocity fluctuation [m/s].
scalar rho_
Density [kg/m^3].
bool moving_
Moving flag - tracking stopped when moving = false.
static void readFields(TrackCloudType &c)
Read.
scalar tTurb_
Time spent in turbulent eddy [s].
scalar dTarget_
Target diameter [m].
MomentumParcel(const polyMesh &mesh, const barycentric &coordinates, const label celli, const label tetFacei, const label tetPti, const label facei)
Construct from mesh, coordinates and topology.
static void writeFields(const TrackCloudType &c)
Write.
vector U_
Velocity of Parcel [m/s].
scalar nParticle_
Number of particles in Parcel.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
virtual bool write(const bool write=true) const
Write using setting from DB.
A class for handling character strings derived from std::string.
const dimensionedScalar c
Speed of light in a vacuum.
void write(std::ostream &os, const bool binary, List< floatScalar > &fField)
Write floats ascii or binary.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
void readFields(const typename GeoFieldType::Mesh &mesh, const IOobjectList &objects, const HashSet< word > &selectedFields, LIFOStack< regIOobject * > &storedObjects)
Read the selected GeometricFields of the specified type.
bool readScalar(const char *buf, doubleScalar &s)
Read whole of buf as a scalar. Return true if successful.
label readLabel(Istream &is)