36 template<
class ParcelType>
39 sizeof(DSMCParcel<ParcelType>) -
sizeof(ParcelType)
45 template<
class ParcelType>
72 readRawScalar(is, &
Ei_);
87 template<
class ParcelType>
90 const bool readOnProc =
c.size();
95 c.checkFieldIOobject(
c,
U);
98 c.checkFieldIOobject(
c, Ei);
100 IOField<label> typeId
105 c.checkFieldIOobject(
c, typeId);
108 for (DSMCParcel<ParcelType>&
p :
c)
112 p.typeId_ = typeId[i];
118 template<
class ParcelType>
121 const Cloud<DSMCParcel<ParcelType>>&
c 126 const label np =
c.size();
127 const bool writeOnProc =
c.size();
134 for (
const DSMCParcel<ParcelType>&
p :
c)
138 typeId[i] =
p.typeId();
142 U.write(writeOnProc);
143 Ei.write(writeOnProc);
144 typeId.write(writeOnProc);
150 template<
class ParcelType>
154 const DSMCParcel<ParcelType>&
p 159 os << static_cast<const ParcelType& >(
p)
166 os << static_cast<const ParcelType& >(
p);
169 reinterpret_cast<const char*>(&
p.U_),
std::enable_if< std::is_floating_point< T >::value, bool >::type checkScalarSize() const noexcept
Check if the scalar byte-size associated with the stream is the same as the given type...
virtual Ostream & write(const char c) override
Write character.
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)...
label typeId_
Parcel type id.
virtual bool endRawRead()=0
End of low-level raw binary read.
::Foam::direction nComponents(const expressions::valueTypeCode) noexcept
The number of components associated with given valueTypeCode.
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.
void readFields(const typename GeoFieldType::Mesh &mesh, const IOobjectList &objects, const NameMatchPredicate &selectedFields, DynamicList< regIOobject *> &storedObjects)
Read the selected GeometricFields of the templated type and store on the objectRegistry.
void writeFields(const fvMesh &mesh, const wordHashSet &selectedFields, const bool writeFaceFields)
An Ostream is an abstract base class for all output systems (streams, files, token lists...
OBJstream os(runTime.globalPath()/outputName)
label readRawLabel(Istream &is)
Read raw label from binary stream.
virtual bool beginRawRead()=0
Start of low-level raw binary read.
const dimensionedScalar c
Speed of light in a vacuum.
scalar Ei_
Internal energy of the Parcel, covering all non-translational.
std::enable_if< std::is_integral< T >::value, bool >::type checkLabelSize() const noexcept
Check if the label byte-size associated with the stream is the same as the given type.
Mesh consisting of general polyhedral cells.
vector U_
Velocity of Parcel [m/s].
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.
streamFormat format() const noexcept
Get the current stream format.
static const std::size_t sizeofFields
Size in bytes of the fields.
static constexpr const zero Zero
Global zero (0)