35 template<
class ParcelType>
40 template<
class ParcelType>
43 sizeof(MPPICParcel<ParcelType>) -
sizeof(ParcelType)
49 template<
class ParcelType>
87 template<
class ParcelType>
88 template<
class CloudType>
91 const bool readOnProc =
c.size();
100 c.checkFieldIOobject(
c, UCorrect);
105 p.UCorrect_ = UCorrect[i];
112 template<
class ParcelType>
113 template<
class CloudType>
118 const label np =
c.size();
119 const bool writeOnProc =
c.size();
125 for (
const MPPICParcel<ParcelType>&
p :
c)
127 UCorrect[i] =
p.UCorrect();
132 UCorrect.
write(writeOnProc);
136 template<
class ParcelType>
145 ParcelType::writeProperties(
os, filters, delim, namesOnly);
148 #define writeProp(Name, Value) \ 149 ParcelType::writeProperty(os, Name, Value, namesOnly, delim, filters) 157 template<
class ParcelType>
158 template<
class CloudType>
165 ParcelType::readObjects(
c, obr);
168 if (!
c.size())
return;
170 const auto& UCorrect = cloud::lookupIOField<vector>(
"UCorrect", obr);
175 p.UCorrect() = UCorrect[i];
182 template<
class ParcelType>
183 template<
class CloudType>
190 ParcelType::writeObjects(
c, obr);
192 const label np =
c.size();
195 auto& UCorrect = cloud::createIOField<vector>(
"UCorrect", np, obr);
198 for (
const MPPICParcel<ParcelType>&
p :
c)
200 UCorrect[i] =
p.UCorrect();
209 template<
class ParcelType>
213 const MPPICParcel<ParcelType>&
p 218 os << static_cast<const ParcelType&>(
p)
223 os << static_cast<const ParcelType&>(
p);
226 reinterpret_cast<const char*>(&
p.UCorrect_),
DSMCCloud< dsmcParcel > CloudType
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)...
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.
static void readObjects(CloudType &c, const objectRegistry &obr)
Read particle fields as objects from the obr registry.
#define writeProp(Name, Value)
Useful combination of include files which define Sin, Sout and Serr and the use of IO streams general...
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.
A class for handling words, derived from Foam::string.
Wrapper around kinematic parcel types to add MPPIC modelling.
virtual bool write(const bool writeOnProc=true) const
Write using setting from DB.
A List of wordRe with additional matching capabilities.
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)
static void writeFields(const CloudType &c)
Write.
static const std::size_t sizeofFields
Size in bytes of the fields.
vector UCorrect_
Velocity correction due to collisions [m/s].
MPPICParcel(const polyMesh &mesh, const barycentric &coordinates, const label celli, const label tetFacei, const label tetPti)
Construct from mesh, coordinates and topology.
virtual bool beginRawRead()=0
Start of low-level raw binary read.
const dimensionedScalar c
Speed of light in a vacuum.
static void readFields(CloudType &c)
Read.
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.
Registry of regIOobjects.
A class for handling character strings derived from std::string.
Templated base class for dsmc cloud.
A primitive field of type <T> with automated input and output.
void writeProperties(Ostream &os, const wordRes &filters, const word &delim, const bool namesOnly=false) const
Write individual parcel properties to stream.
streamFormat format() const noexcept
Get the current stream format.
static void writeObjects(const CloudType &c, objectRegistry &obr)
Write particle fields as objects into the obr registry.
static constexpr const zero Zero
Global zero (0)