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>
73 pairOrigProcOfOther.
size() != nPair
74 || pairOrigIdOfOther.
size() != nPair
75 || pairData.
size() != nPair
79 <<
"Pair field size mismatch." <<
nl 81 << pairOrigProcOfOther <<
nl 82 << pairOrigIdOfOther <<
nl 94 pairOrigProcOfOther[i],
103 if (wallPRel.
size() != nWall || wallData.
size() != nWall)
106 <<
"Wall field size mismatch." <<
nl 107 << wallAccessed <<
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>
428 is >> cRL.pairRecords_ >> cRL.wallRecords_;
433 "Foam::Istream& Foam::operator>>" 434 "(Foam::Istream&, Foam::CollisionRecordList<PairType, WallType>&)" 441 template<
class PairType,
class WallType>
448 os << cRL.pairRecords_ << cRL.wallRecords_;
453 "Foam::Ostream& Foam::operator<<(Foam::Ostream&, " 454 "const Foam::CollisionRecordList<PairType, WallType>&)" Field< WallType > wallData() const
Return field of wall data from each record, used for field IO.
~CollisionRecordList()
Destructor.
#define forAll(list, i)
Loop across all elements in list.
labelField wallAccessed() const
Return field of wall accessed from each record, used for field IO.
bool match(label queryOrigProcOfOther, label queryOrigIdOfOther) const
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
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.
const dimensionedScalar b
Wien displacement law constant: default SI units: [m K].
Field< PairType > pairData() const
Return field of pair data from each record, used for field IO.
labelField pairAccessed() const
Return field of pair accessed from each record, used for.
void update()
Update the collision records, deleting any records not.
CollisionRecordList()
Construct null.
Useful combination of include files which define Sin, Sout and Serr and the use of IO streams general...
bool checkWallRecord(const vector &pRel, scalar radius)
Enquire if the specified record exists without modifying.
A 1D vector of objects of type <T> that resizes itself as necessary to accept the new objects...
labelField pairOrigProcOfOther() const
Return field of pair origProcOfOther from each record,.
labelField pairOrigIdOfOther() const
Return field of pair origIdOfOther from each record, used.
DynamicList< T, SizeInc, SizeMult, SizeDiv > & append(const T &)
Append an element at the end of the list.
errorManip< error > abort(error &err)
void setAccessed()
Set the accessed property of the record to accessed.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
PairCollisionRecord< PairType > & matchPairRecord(label origProcOfOther, label origIdOfOther)
Enquires if the proc and id pair of the other particle are.
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)
WallCollisionRecord< WallType > & matchWallRecord(const vector &pRel, scalar radius)
Enquires if the position of wall impact relative to the.
Record of a collision between the particle holding the record and the particle with the stored id...
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.
void setAccessed()
Set the accessed property of the record to accessed.