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>
89 c.checkFieldIOobject(
c,
U);
92 c.checkFieldIOobject(
c, Ei);
95 c.checkFieldIOobject(
c, typeId);
110 template<
class ParcelType>
116 ParcelType::writeFields(
c);
122 IOField<label> typeId(
c.fieldIOobject(
"typeId", IOobject::NO_READ), np);
143 template<
class ParcelType>
150 if (os.format() == IOstream::ASCII)
152 os << static_cast<const ParcelType& >(
p)
153 << token::SPACE <<
p.U()
154 << token::SPACE <<
p.Ei()
155 << token::SPACE <<
p.typeId();
159 os << static_cast<const ParcelType& >(
p);
162 reinterpret_cast<const char*>(&
p.U_),
170 "Ostream& operator<<(Ostream&, const DSMCParcel<ParcelType>&)"
streamFormat format() const
Return current stream format.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
#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)...
virtual bool check(const char *operation) const
Check IOstream status for given operation.
label typeId_
Parcel type id.
DSMCParcel(const polyMesh &mesh, const vector &position, const vector &U, const scalar Ei, const label celli, const label tetFacei, const label tetPtI, const label typeId)
Construct from components.
label typeId() const
Return type id.
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.
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.
forAllConstIter(PtrDictionary< phaseModel >, mixture.phases(), phase)
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...
const vector & U() const
Return const access to velocity.
scalar Ei() const
Return const access to internal energy.
const dimensionedScalar c
Speed of light in a vacuum.
scalar Ei_
Internal energy of the Parcel, covering all non-translational.
Mesh consisting of general polyhedral cells.
vector U_
Velocity of Parcel [m/s].