32 template<
class ParcelType>
36 template<
class ParcelType>
39 offsetof(CollidingParcel<ParcelType>, collisionRecords_)
40 - offsetof(CollidingParcel<ParcelType>, f_)
46 template<
class ParcelType>
51 angularMomentum_(
Zero),
65 is.
read(
reinterpret_cast<char*
>(&
f_), sizeofFields_);
74 "CollidingParcel<ParcelType>::Collisions"
75 "(const polyMesh&, Istream&, bool)"
80 template<
class ParcelType>
81 template<
class CloudType>
89 c.checkFieldIOobject(
c,
f);
96 c.checkFieldIOobject(
c, angularMomentum);
103 c.checkFieldIOobject(
c, torque);
110 c.checkFieldFieldIOobject(
c, collisionRecordsPairAccessed);
116 "collisionRecordsPairOrigProcOfOther",
121 c.checkFieldFieldIOobject(
c, collisionRecordsPairOrigProcOfOther);
127 "collisionRecordsPairOrigIdOfOther",
132 c.checkFieldFieldIOobject(
c, collisionRecordsPairOrigProcOfOther);
139 c.checkFieldFieldIOobject(
c, collisionRecordsPairData);
146 c.checkFieldFieldIOobject(
c, collisionRecordsWallAccessed);
153 c.checkFieldFieldIOobject(
c, collisionRecordsWallPRel);
160 c.checkFieldFieldIOobject(
c, collisionRecordsWallData);
169 p.angularMomentum_ = angularMomentum[i];
170 p.torque_ = torque[i];
174 collisionRecordsPairAccessed[i],
175 collisionRecordsPairOrigProcOfOther[i],
176 collisionRecordsPairOrigIdOfOther[i],
177 collisionRecordsPairData[i],
178 collisionRecordsWallAccessed[i],
179 collisionRecordsWallPRel[i],
180 collisionRecordsWallData[i]
188 template<
class ParcelType>
189 template<
class CloudType>
192 ParcelType::writeFields(
c);
213 "collisionRecordsPairOrigProcOfOther",
251 angularMomentum[i] =
p.angularMomentum();
252 torque[i] =
p.torque();
254 collisionRecordsPairAccessed[i] =
p.collisionRecords().pairAccessed();
255 collisionRecordsPairOrigProcOfOther[i] =
256 p.collisionRecords().pairOrigProcOfOther();
257 collisionRecordsPairOrigIdOfOther[i] =
258 p.collisionRecords().pairOrigIdOfOther();
259 collisionRecordsPairData[i] =
p.collisionRecords().pairData();
260 collisionRecordsWallAccessed[i] =
p.collisionRecords().wallAccessed();
261 collisionRecordsWallPRel[i] =
p.collisionRecords().wallPRel();
262 collisionRecordsWallData[i] =
p.collisionRecords().wallData();
267 const bool write = (np > 0);
274 collisionRecordsPairOrigProcOfOther.
write(
write);
275 collisionRecordsPairOrigIdOfOther.
write(
write);
285 template<
class ParcelType>
294 os << static_cast<const ParcelType&>(
p)
302 os << static_cast<const ParcelType&>(
p);
305 reinterpret_cast<const char*
>(&
p.f_),
306 CollidingParcel<ParcelType>::sizeofFields_
308 os <<
p.collisionRecords();
314 "Ostream& operator<<(Ostream&, const CollidingParcel<ParcelType>&)"
Useful combination of include files which define Sin, Sout and Serr and the use of IO streams general...
#define forAllIter(Container, container, iter)
Iterate across all elements in the container object of type.
#define forAllConstIter(Container, container, iter)
Iterate across all elements in the container object of type.
Wrapper around parcel types to add collision modelling.
vector f_
Force on particle due to collisions [N].
CollidingParcel(const polyMesh &mesh, const barycentric &coordinates, const label celli, const label tetFacei, const label tetPti, const label facei)
Construct from mesh, coordinates and topology.
collisionRecordList collisionRecords_
Particle collision records.
static void writeFields(const CloudType &c)
Write.
vector angularMomentum_
Angular momentum of Parcel in global reference frame [kg m2/s].
static void readFields(CloudType &c)
Read.
vector torque_
Torque on particle due to collisions in global.
A Field of objects of type <Type> with automated input and output using a compact storage....
Templated base class for dsmc cloud.
A primitive field of type <Type> with automated input and output.
streamFormat format() const
Return current stream format.
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 Istream & read(token &)=0
Return next token from stream.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
virtual bool write(const bool write=true) const
Write using setting from DB.
A class for handling character strings derived from std::string.
const dimensionedScalar c
Speed of light in a vacuum.
void write(std::ostream &os, const bool binary, List< floatScalar > &fField)
Write floats ascii or binary.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
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.
CollisionRecordList< vector, vector > collisionRecordList