31 template<
class PairType,
class WallType>
39 template<
class PairType,
class WallType>
48 "Foam::CollisionRecordList<PairType, WallType>::"
49 "CollisionRecordList(Foam::Istream&)"
54 template<
class PairType,
class WallType>
79 <<
"Pair field size mismatch." <<
nl
106 <<
"Wall field size mismatch." <<
nl
130 template<
class PairType,
class WallType>
137 template<
class PairType,
class WallType>
145 f[i] = pairRecords_[i].accessed();
152 template<
class PairType,
class WallType>
160 f[i] = pairRecords_[i].origProcOfOther();
167 template<
class PairType,
class WallType>
175 f[i] = pairRecords_[i].origIdOfOther();
182 template<
class PairType,
class WallType>
190 f[i] = pairRecords_[i].collisionData();
197 template<
class PairType,
class WallType>
205 f[i] = wallRecords_[i].accessed();
212 template<
class PairType,
class WallType>
220 f[i] = wallRecords_[i].pRel();
227 template<
class PairType,
class WallType>
235 f[i] = wallRecords_[i].collisionData();
242 template<
class PairType,
class WallType>
246 label origProcOfOther,
258 if (pCR.
match(origProcOfOther, origIdOfOther))
275 return pairRecords_.last();
279 template<
class PairType,
class WallType>
282 label origProcOfOther,
290 if (pCR.
match(origProcOfOther, origIdOfOther))
300 template<
class PairType,
class WallType>
315 if (wCR.
match(pRel, radius))
329 return wallRecords_.last();
333 template<
class PairType,
class WallType>
344 if (wCR.
match(pRel, radius))
354 template<
class PairType,
class WallType>
362 if (pairRecords_[i].accessed())
364 pairRecords_[i].setUnaccessed();
366 updatedRecords.
append(pairRecords_[i]);
370 pairRecords_ = updatedRecords;
378 if (wallRecords_[i].accessed())
380 wallRecords_[i].setUnaccessed();
382 updatedRecords.
append(wallRecords_[i]);
386 wallRecords_ = updatedRecords;
393 template<
class PairType,
class WallType>
394 inline bool Foam::operator==
402 a.pairRecords_ ==
b.pairRecords_
403 && a.wallRecords_ ==
b.wallRecords_
408 template<
class PairType,
class WallType>
409 inline bool Foam::operator!=
421 template<
class PairType,
class WallType>
425 CollisionRecordList<PairType, WallType>& cRL
428 is >> cRL.pairRecords_ >> cRL.wallRecords_;
433 "Foam::Istream& Foam::operator>>"
434 "(Foam::Istream&, Foam::CollisionRecordList<PairType, WallType>&)"
441 template<
class PairType,
class WallType>
445 const CollisionRecordList<PairType, WallType>& cRL
448 os << cRL.pairRecords_ << cRL.wallRecords_;
453 "Foam::Ostream& Foam::operator<<(Foam::Ostream&, "
454 "const Foam::CollisionRecordList<PairType, WallType>&)"
Useful combination of include files which define Sin, Sout and Serr and the use of IO streams general...
#define forAll(list, i)
Loop across all elements in list.
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.
~CollisionRecordList()
Destructor.
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.
CollisionRecordList()
Construct null.
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,.
A 1D vector of objects of type <T> that resizes itself as necessary to accept the new objects.
DynamicList< T, SizeInc, SizeMult, SizeDiv > & append(const T &)
Append an element at the end of the 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)....
void size(const label)
Override size to be inconsistent with allocated storage.
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.
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.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
errorManip< error > abort(error &err)