Go to the documentation of this file.
34 template<
class PairType,
class WallType>
44 template<
class PairType,
class WallType>
59 label nPair = pairAccessed.size();
63 pairOrigProcOfOther.size() != nPair
64 || pairOrigIdOfOther.size() != nPair
65 || pairData.size() != nPair
69 <<
"Pair field size mismatch." <<
nl
71 << pairOrigProcOfOther <<
nl
72 << pairOrigIdOfOther <<
nl
84 pairOrigProcOfOther[i],
91 label nWall = wallAccessed.size();
93 if (wallPRel.size() != nWall || wallData.size() != nWall)
96 <<
"Wall field size mismatch." <<
nl
120 template<
class PairType,
class WallType>
128 f[i] = pairRecords_[i].accessed();
135 template<
class PairType,
class WallType>
143 f[i] = pairRecords_[i].origProcOfOther();
150 template<
class PairType,
class WallType>
158 f[i] = pairRecords_[i].origIdOfOther();
165 template<
class PairType,
class WallType>
173 f[i] = pairRecords_[i].collisionData();
180 template<
class PairType,
class WallType>
188 f[i] = wallRecords_[i].accessed();
195 template<
class PairType,
class WallType>
203 f[i] = wallRecords_[i].pRel();
210 template<
class PairType,
class WallType>
218 f[i] = wallRecords_[i].collisionData();
225 template<
class PairType,
class WallType>
229 label origProcOfOther,
241 if (pCR.
match(origProcOfOther, origIdOfOther))
258 return pairRecords_.last();
262 template<
class PairType,
class WallType>
265 label origProcOfOther,
273 if (pCR.
match(origProcOfOther, origIdOfOther))
283 template<
class PairType,
class WallType>
298 if (wCR.
match(pRel, radius))
312 return wallRecords_.last();
316 template<
class PairType,
class WallType>
327 if (wCR.
match(pRel, radius))
337 template<
class PairType,
class WallType>
345 if (pairRecords_[i].accessed())
347 pairRecords_[i].setUnaccessed();
349 updatedRecords.
append(pairRecords_[i]);
353 pairRecords_ = updatedRecords;
361 if (wallRecords_[i].accessed())
363 wallRecords_[i].setUnaccessed();
365 updatedRecords.
append(wallRecords_[i]);
369 wallRecords_ = updatedRecords;
376 template<
class PairType,
class WallType>
377 inline bool Foam::operator==
385 a.pairRecords_ ==
b.pairRecords_
386 && a.wallRecords_ ==
b.wallRecords_
391 template<
class PairType,
class WallType>
392 inline bool Foam::operator!=
404 template<
class PairType,
class WallType>
408 CollisionRecordList<PairType, WallType>& cRL
411 is >> cRL.pairRecords_ >> cRL.wallRecords_;
418 template<
class PairType,
class WallType>
422 const CollisionRecordList<PairType, WallType>& cRL
425 os << cRL.pairRecords_ << cRL.wallRecords_;
Useful combination of include files which define Sin, Sout and Serr and the use of IO streams general...
vectorField wallPRel() const
Return field of wall pRel from each record, used for field IO.
A 1D vector of objects of type <T> that resizes itself as necessary to accept the new objects.
CollisionRecordList()=default
Default construct.
labelField wallAccessed() const
Return field of wall accessed from each record, used for field IO.
labelField pairOrigIdOfOther() const
Return field of pair origIdOfOther from each record, used.
#define forAll(list, i)
Loop across all elements in list.
const dimensionedScalar b
Wien displacement law constant: default SI units: [m.K].
bool checkWallRecord(const vector &pRel, scalar radius)
Enquire if the specified record exists without modifying.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
bool checkPairRecord(label origProcOfOther, label origIdOfOther)
Enquire if the specified record exists without modifying.
DynamicList< T, SizeMin > & append(const T &val)
Append an element to the end of this list.
bool match(label queryOrigProcOfOther, label queryOrigIdOfOther) const
Field< PairType > pairData() const
Return field of pair data from each record, used for field IO.
Record of a collision between the particle holding the record and a wall face at the position relativ...
Record of a collision between the particle holding the record and the particle with the stored id.
void setAccessed()
Set the accessed property of the record to accessed.
virtual bool check(const char *operation) const
Check IOstream status for given operation.
labelField pairOrigProcOfOther() const
Return field of pair origProcOfOther from each record,.
bool match(const vector &pRel, scalar radius)
errorManip< error > abort(error &err)
Field< WallType > wallData() const
Return field of wall data from each record, used for field IO.
void update()
Update the collision records, deleting any records not.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
PairCollisionRecord< PairType > & matchPairRecord(label origProcOfOther, label origIdOfOther)
Enquires if the proc and id pair of the other particle are.
labelField pairAccessed() const
Return field of pair accessed from each record, used for.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
void setAccessed()
Set the accessed property of the record to accessed.
WallCollisionRecord< WallType > & matchWallRecord(const vector &pRel, scalar radius)
Enquires if the position of wall impact relative to the.