33 template<
class ParcelType>
36 sizeof(DSMCParcel<ParcelType>) -
sizeof(ParcelType)
42 template<
class ParcelType>
50 ParcelType(mesh, is, readFields),
57 if (is.
format() == IOstream::ASCII)
65 is.
read(reinterpret_cast<char*>(&U_), sizeofFields_);
72 "DSMCParcel<ParcelType>::DSMCParcel" 73 "(const Cloud<ParcelType>&, Istream&, bool)" 78 template<
class ParcelType>
81 bool valid =
c.size();
86 c.checkFieldIOobject(
c,
U);
89 c.checkFieldIOobject(
c, Ei);
93 c.fieldIOobject(
"typeId", IOobject::MUST_READ),
96 c.checkFieldIOobject(
c, typeId);
111 template<
class ParcelType>
117 ParcelType::writeFields(
c);
123 IOField<label> typeId(
c.fieldIOobject(
"typeId", IOobject::NO_READ), np);
138 typeId.write(np > 0);
144 template<
class ParcelType>
151 if (os.format() == IOstream::ASCII)
153 os << static_cast<const ParcelType& >(
p)
154 << token::SPACE <<
p.U()
155 << token::SPACE <<
p.Ei()
156 << token::SPACE <<
p.typeId();
160 os << static_cast<const ParcelType& >(
p);
163 reinterpret_cast<const char*>(&
p.U_),
171 "Ostream& operator<<(Ostream&, const DSMCParcel<ParcelType>&)"
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.
virtual bool check(const char *operation) const
Check IOstream status for given operation.
#define forAllConstIter(Container, container, iter)
Iterate across all elements in the container object of type.
#define forAllIter(Container, container, iter)
Iterate across all elements in the container object of type.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)...
label typeId_
Parcel type id.
const dimensionedScalar c
Speed of light in a vacuum.
Useful combination of include files which define Sin, Sout and Serr and the use of IO streams general...
static void readFields(Cloud< DSMCParcel< ParcelType >> &c)
static void writeFields(const Cloud< DSMCParcel< ParcelType >> &c)
virtual Istream & read(token &)=0
Return next token from stream.
streamFormat format() const
Return current stream format.
label readLabel(Istream &is)
Base cloud calls templated on particle type.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
scalar Ei_
Internal energy of the Parcel, covering all non-translational.
scalar Ei() const
Return const access to internal energy.
Mesh consisting of general polyhedral cells.
vector U_
Velocity of Parcel [m/s].
label typeId() const
Return type id.
DSMCParcel(const polyMesh &mesh, const barycentric &coordinates, const label celli, const label tetFacei, const label tetPti, const vector &U, const scalar Ei, const label typeId)
Construct from components.
A primitive field of type <T> with automated input and output.
const vector & U() const
Return const access to velocity.