34template<
class PairType,
class WallType>
44template<
class PairType,
class WallType>
69 <<
"Pair field size mismatch." <<
nl
96 <<
"Wall field size mismatch." <<
nl
120template<
class PairType,
class WallType>
128 f[i] = pairRecords_[i].accessed();
135template<
class PairType,
class WallType>
143 f[i] = pairRecords_[i].origProcOfOther();
150template<
class PairType,
class WallType>
158 f[i] = pairRecords_[i].origIdOfOther();
165template<
class PairType,
class WallType>
173 f[i] = pairRecords_[i].collisionData();
180template<
class PairType,
class WallType>
188 f[i] = wallRecords_[i].accessed();
195template<
class PairType,
class WallType>
203 f[i] = wallRecords_[i].pRel();
210template<
class PairType,
class WallType>
218 f[i] = wallRecords_[i].collisionData();
225template<
class PairType,
class WallType>
229 label origProcOfOther,
241 if (pCR.
match(origProcOfOther, origIdOfOther))
258 return pairRecords_.last();
262template<
class PairType,
class WallType>
265 label origProcOfOther,
273 if (pCR.
match(origProcOfOther, origIdOfOther))
283template<
class PairType,
class WallType>
298 if (wCR.
match(pRel, radius))
312 return wallRecords_.last();
316template<
class PairType,
class WallType>
327 if (wCR.
match(pRel, radius))
337template<
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;
376template<
class PairType,
class WallType>
377inline bool Foam::operator==
385 a.pairRecords_ ==
b.pairRecords_
386 && a.wallRecords_ ==
b.wallRecords_
391template<
class PairType,
class WallType>
392inline bool Foam::operator!=
404template<
class PairType,
class WallType>
408 CollisionRecordList<PairType, WallType>& cRL
411 is >> cRL.pairRecords_ >> cRL.wallRecords_;
418template<
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...
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.
labelField pairOrigIdOfOther() const
Return field of pair origIdOfOther from each record, used.
vectorField wallPRel() const
Return field of wall pRel from each record, used for field IO.
bool checkPairRecord(label origProcOfOther, label origIdOfOther)
Enquire if the specified record exists without modifying.
Field< WallType > wallData() const
Return field of wall data from each record, used for field IO.
Field< PairType > pairData() const
Return field of pair data from each record, used for field IO.
WallCollisionRecord< WallType > & matchWallRecord(const vector &pRel, scalar radius)
Enquires if the position of wall impact relative to the.
labelField wallAccessed() const
Return field of wall accessed from each record, used for field IO.
bool checkWallRecord(const vector &pRel, scalar radius)
Enquire if the specified record exists without modifying.
void update()
Update the collision records, deleting any records not.
labelField pairOrigProcOfOther() const
Return field of pair origProcOfOther from each record,.
CollisionRecordList()=default
Default construct.
A 1D vector of objects of type <T> that resizes itself as necessary to accept the new objects.
void append(const T &val)
Copy append an element to the end of this list.
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)....
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Record of a collision between the particle holding the record and the particle with the stored id.
bool match(label queryOrigProcOfOther, label queryOrigIdOfOther) const
void setAccessed()
Set the accessed property of the record to accessed.
void size(const label n)
Older name for setAddressableSize.
Record of a collision between the particle holding the record and a wall face at the position relativ...
bool match(const vector &pRel, scalar radius)
void setAccessed()
Set the accessed property of the record to accessed.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
OBJstream os(runTime.globalPath()/outputName)
errorManip< error > abort(error &err)
constexpr char nl
The newline '\n' character (0x0a)
#define forAll(list, i)
Loop across all elements in list.