Go to the documentation of this file.
34 template<
class PairType,
class WallType>
42 template<
class PairType,
class WallType>
52 template<
class PairType,
class WallType>
67 label nPair = pairAccessed.size();
71 pairOrigProcOfOther.size() != nPair
72 || pairOrigIdOfOther.size() != nPair
73 || pairData.size() != nPair
77 <<
"Pair field size mismatch." <<
nl
79 << pairOrigProcOfOther <<
nl
80 << pairOrigIdOfOther <<
nl
92 pairOrigProcOfOther[i],
99 label nWall = wallAccessed.size();
101 if (wallPRel.size() != nWall || wallData.size() != nWall)
104 <<
"Wall field size mismatch." <<
nl
105 << wallAccessed <<
nl
128 template<
class PairType,
class WallType>
135 template<
class PairType,
class WallType>
143 f[i] = pairRecords_[i].accessed();
150 template<
class PairType,
class WallType>
158 f[i] = pairRecords_[i].origProcOfOther();
165 template<
class PairType,
class WallType>
173 f[i] = pairRecords_[i].origIdOfOther();
180 template<
class PairType,
class WallType>
188 f[i] = pairRecords_[i].collisionData();
195 template<
class PairType,
class WallType>
203 f[i] = wallRecords_[i].accessed();
210 template<
class PairType,
class WallType>
218 f[i] = wallRecords_[i].pRel();
225 template<
class PairType,
class WallType>
233 f[i] = wallRecords_[i].collisionData();
240 template<
class PairType,
class WallType>
244 label origProcOfOther,
256 if (pCR.
match(origProcOfOther, origIdOfOther))
273 return pairRecords_.last();
277 template<
class PairType,
class WallType>
280 label origProcOfOther,
288 if (pCR.
match(origProcOfOther, origIdOfOther))
298 template<
class PairType,
class WallType>
313 if (wCR.
match(pRel, radius))
327 return wallRecords_.last();
331 template<
class PairType,
class WallType>
342 if (wCR.
match(pRel, radius))
352 template<
class PairType,
class WallType>
360 if (pairRecords_[i].accessed())
362 pairRecords_[i].setUnaccessed();
364 updatedRecords.
append(pairRecords_[i]);
368 pairRecords_ = updatedRecords;
376 if (wallRecords_[i].accessed())
378 wallRecords_[i].setUnaccessed();
380 updatedRecords.
append(wallRecords_[i]);
384 wallRecords_ = updatedRecords;
391 template<
class PairType,
class WallType>
402 pairRecords_ = rhs.pairRecords_;
403 wallRecords_ = rhs.wallRecords_;
409 template<
class PairType,
class WallType>
410 inline bool Foam::operator==
418 a.pairRecords_ ==
b.pairRecords_
419 && a.wallRecords_ ==
b.wallRecords_
424 template<
class PairType,
class WallType>
425 inline bool Foam::operator!=
437 template<
class PairType,
class WallType>
441 CollisionRecordList<PairType, WallType>& cRL
444 is >> cRL.pairRecords_ >> cRL.wallRecords_;
451 template<
class PairType,
class WallType>
455 const CollisionRecordList<PairType, WallType>& cRL
458 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.
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.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
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
~CollisionRecordList()
Destructor.
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.
CollisionRecordList()
Construct null.
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.