Go to the documentation of this file.
34 template<
class ParcelType>
39 template<
class ParcelType>
42 sizeof(ThermoParcel<ParcelType>)
43 - offsetof(ThermoParcel<ParcelType>, T_)
49 template<
class ParcelType>
64 if (is.
format() == IOstream::ASCII)
74 readRawScalar(is, &T_);
75 readRawScalar(is, &Cp_);
81 is.
read(
reinterpret_cast<char*
>(&T_), sizeofFields);
89 template<
class ParcelType>
90 template<
class CloudType>
93 const bool valid =
c.size();
98 c.checkFieldIOobject(
c,
T);
101 c.checkFieldIOobject(
c,
Cp);
115 template<
class ParcelType>
116 template<
class CloudType>
121 const label np =
c.size();
122 const bool valid = np;
141 template<
class ParcelType>
150 ParcelType::writeProperties(os, filters, delim, namesOnly);
153 #define writeProp(Name, Value) \
154 ParcelType::writeProperty(os, Name, Value, namesOnly, delim, filters)
163 template<
class ParcelType>
164 template<
class CloudType>
173 if (!
c.size())
return;
175 auto&
T = cloud::lookupIOField<scalar>(
"T", obr);
176 auto&
Cp = cloud::lookupIOField<scalar>(
"Cp", obr);
189 template<
class ParcelType>
190 template<
class CloudType>
197 ParcelType::writeObjects(
c, obr);
199 const label np =
c.size();
201 auto&
T = cloud::createIOField<scalar>(
"T", np, obr);
202 auto&
Cp = cloud::createIOField<scalar>(
"Cp", np, obr);
217 template<
class ParcelType>
224 if (os.format() == IOstream::ASCII)
226 os << static_cast<const ParcelType&>(
p)
227 << token::SPACE <<
p.T()
228 << token::SPACE <<
p.Cp();
232 os << static_cast<const ParcelType&>(
p);
235 reinterpret_cast<const char*
>(&
p.T_),
236 ThermoParcel<ParcelType>::sizeofFields
Useful combination of include files which define Sin, Sout and Serr and the use of IO streams general...
static void writeFields(const CloudType &c)
Write.
A class for handling words, derived from Foam::string.
A primitive field of type <T> with automated input and output.
streamFormat format() const noexcept
Get the current stream format.
void writeProperties(Ostream &os, const wordRes &filters, const word &delim, const bool namesOnly=false) const
Write individual parcel properties to stream.
A class for handling character strings derived from std::string.
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.
Mesh consisting of general polyhedral cells.
Registry of regIOobjects.
virtual bool endRawRead()=0
End of low-level raw binary read.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
std::enable_if< std::is_integral< T >::value, bool >::type checkLabelSize() const
void writeFields(const fvMesh &mesh, const wordHashSet &selectedFields)
static void readObjects(CloudType &c, const objectRegistry &obr)
Read particle fields as objects from the obr registry.
Templated base class for dsmc cloud.
virtual bool check(const char *operation) const
Check IOstream status for given operation.
void readFields(const typename GeoFieldType::Mesh &mesh, const IOobjectList &objects, const wordHashSet &selectedFields, LIFOStack< regIOobject * > &storedObjects)
Read the selected GeometricFields of the templated type.
virtual bool beginRawRead()=0
Start of low-level raw binary read.
std::enable_if< std::is_floating_point< T >::value, bool >::type checkScalarSize() const
Thermodynamic parcel class with one/two-way coupling with the continuous phase. Includes Kinematic pa...
A List of wordRe with additional matching capabilities.
const volScalarField & Cp
const dimensionedScalar c
Speed of light in a vacuum.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
#define writeProp(Name, Value)
ThermoParcel(const polyMesh &mesh, const barycentric &coordinates, const label celli, const label tetFacei, const label tetPti)
Construct from mesh, coordinates and topology.
static void readFields(CloudType &c)
Read.
virtual Istream & read(token &)=0
Return next token from stream.