32 template<
class ParcelType>
33 Foam::string Foam::MPPICParcel<ParcelType>::propertyList_ =
36 template<
class ParcelType>
39 sizeof(MPPICParcel<ParcelType>) -
sizeof(ParcelType)
45 template<
class ParcelType>
53 ParcelType(mesh, is, readFields),
58 if (is.
format() == IOstream::ASCII)
64 is.
read(reinterpret_cast<char*>(&UCorrect_), sizeofFields_);
70 "MPPICParcel<ParcelType>::Collisions" 71 "(const polyMesh&, Istream&, bool)" 76 template<
class ParcelType>
77 template<
class CloudType>
80 bool valid = c.
size();
104 template<
class ParcelType>
105 template<
class CloudType>
108 ParcelType::writeFields(c);
113 UCorrect(c.
fieldIOobject(
"UCorrect", IOobject::NO_READ), np);
126 UCorrect.
write(np > 0);
132 template<
class ParcelType>
139 if (os.format() == IOstream::ASCII)
141 os << static_cast<const ParcelType&>(
p)
142 << token::SPACE <<
p.UCorrect();
146 os << static_cast<const ParcelType&>(
p);
149 reinterpret_cast<const char*>(&
p.UCorrect_),
156 "Ostream& operator<<(Ostream&, const MPPICParcel<ParcelType>&)"
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.
virtual bool check(const char *operation) const
Check IOstream status for given operation.
#define forAllConstIter(Container, container, iter)
Iterate across all elements in the container object of type.
#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)...
label size() const
Return the number of particles in the cloud.
const dimensionedScalar c
Speed of light in a vacuum.
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.
Wrapper around parcel types to add MPPIC modelling.
streamFormat format() const
Return current stream format.
const vector & UCorrect() const
Return const access to correction velocity.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
static void writeFields(const CloudType &c)
Write.
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.
void checkFieldIOobject(const Cloud< ParticleType > &c, const IOField< DataType > &data) const
Check lagrangian data field.
static void readFields(CloudType &c)
Read.
Mesh consisting of general polyhedral cells.
virtual bool write(const bool write=true) const
Write using setting from DB.
A class for handling character strings derived from std::string.
Templated base class for dsmc cloud.
IOobject fieldIOobject(const word &fieldName, const IOobject::readOption r) const
Helper to construct IOobject for field and current time.
A primitive field of type <T> with automated input and output.