34template<
class ParcelType>
39template<
class ParcelType>
48template<
class ParcelType>
75 readRawScalar(is, &
mass0_);
93template<
class ParcelType>
94template<
class CloudType>
101template<
class ParcelType>
102template<
class CloudType,
class CompositionType>
106 const CompositionType& compModel
109 bool valid = c.size();
118 c.checkFieldIOobject(c, mass0);
129 const wordList& phaseTypes = compModel.phaseTypes();
130 const label nPhases = phaseTypes.
size();
132 if (compModel.nPhase() == 1)
134 stateLabels = compModel.stateLabels()[0];
151 "Y" + phaseTypes[j] + stateLabels[j],
168template<
class ParcelType>
169template<
class CloudType>
176template<
class ParcelType>
177template<
class CloudType,
class CompositionType>
181 const CompositionType& compModel
186 const label np = c.size();
201 const wordList& phaseTypes = compModel.phaseTypes();
203 if (compModel.nPhase() == 1)
205 stateLabels = compModel.stateLabels()[0];
214 "Y" + phaseTypes[j] + stateLabels[j],
234template<
class ParcelType>
246 #define writeProp(Name, Value) \
247 ParcelType::writeProperty(os, Name, Value, namesOnly, delim, filters)
256template<
class ParcelType>
257template<
class CloudType>
268template<
class ParcelType>
269template<
class CloudType>
280template<
class ParcelType>
281template<
class CloudType,
class CompositionType>
285 const CompositionType& compModel,
291 if (!c.size())
return;
294 auto& mass0 = cloud::lookupIOField<scalar>(
"mass0", obr);
305 const wordList& phaseTypes = compModel.phaseTypes();
307 if (compModel.nPhase() == 1)
309 stateLabels = compModel.stateLabels()[0];
314 const word fieldName =
"Y" + phaseTypes[j] + stateLabels[j];
315 auto&
Y = cloud::lookupIOField<scalar>(fieldName, obr);
328template<
class ParcelType>
329template<
class CloudType,
class CompositionType>
333 const CompositionType& compModel,
339 const label np = c.size();
343 auto& mass0 = cloud::createIOField<scalar>(
"mass0", np, obr);
354 const wordList& phaseTypes = compModel.phaseTypes();
356 if (compModel.nPhase() == 1)
358 stateLabels = compModel.stateLabels()[0];
363 const word fieldName =
"Y" + phaseTypes[j] + stateLabels[j];
364 auto&
Y = cloud::createIOField<scalar>(fieldName, np, obr);
380template<
class ParcelType>
389 os << static_cast<const ParcelType&>(
p)
395 os << static_cast<const ParcelType&>(
p);
398 reinterpret_cast<const char*
>(&
p.mass0_),
Useful combination of include files which define Sin, Sout and Serr and the use of IO streams general...
Templated base class for dsmc cloud.
A 1D vector of objects of type <T> that resizes itself as necessary to accept the new objects.
A primitive field of type <T> with automated input and output.
streamFormat format() const noexcept
Get the current stream format.
std::enable_if< std::is_integral< T >::value, bool >::type checkLabelSize() const noexcept
virtual bool check(const char *operation) const
Check IOstream status for given operation.
std::enable_if< std::is_floating_point< T >::value, bool >::type checkScalarSize() const noexcept
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
virtual bool endRawRead()=0
End of low-level raw binary read.
virtual bool beginRawRead()=0
Start of low-level raw binary read.
virtual Istream & read(token &)=0
Return next token from stream.
void transfer(List< T > &list)
void setSize(const label n)
Alias for resize()
virtual Ostream & write(const char c)
Write character.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Reacting parcel class with one/two-way coupling with the continuous phase.
static const std::size_t sizeofFields
Size in bytes of the fields.
scalarField Y_
Mass fractions of mixture [].
static void readObjects(CloudType &c, const objectRegistry &obr)
Read particle fields as objects from the obr registry.
scalar mass0_
Initial mass [kg].
void writeProperties(Ostream &os, const wordRes &filters, const word &delim, const bool namesOnly=false) const
Write individual parcel properties to stream.
static void readFields(CloudType &c, const CompositionType &compModel)
Read - composition supplied.
void size(const label n)
Older name for setAddressableSize.
void writeFields() const
Write fields.
Reads fields from the time directories and adds them to the mesh database for further post-processing...
Allows specification of different writing frequency of objects registered to the database.
static void readObjects(Cloud< injectedParticle > &c, const objectRegistry &obr)
Read particle fields as objects from the obr registry.
void writeProperties(Ostream &os, const wordRes &filters, const word &delim, const bool namesOnly) const
Write individual parcel properties to stream.
Registry of regIOobjects.
static string propertyList()
Mesh consisting of general polyhedral cells.
virtual bool write(const bool valid=true) const
Write using setting from DB.
A class for handling character strings derived from std::string.
A List of wordRe with additional matching capabilities.
A class for handling words, derived from Foam::string.
PtrList< volScalarField > & Y
OBJstream os(runTime.globalPath()/outputName)
#define writeProp(Name, Value)
void readFields(const typename GeoFieldType::Mesh &mesh, const IOobjectList &objects, const wordHashSet &selectedFields, LIFOStack< regIOobject * > &storedObjects)
Read the selected GeometricFields of the templated type.
#define forAll(list, i)
Loop across all elements in list.