PairCollisionRecord< Type > Class Template Reference

Record of a collision between the particle holding the record and the particle with the stored id. More...

Public Member Functions

 PairCollisionRecord ()
 Construct null. More...
 
 PairCollisionRecord (bool accessed, label origProcOfOther, label origIdOfOther, const Type &data=pTraits< Type >::zero)
 Construct from components. More...
 
 PairCollisionRecord (Istream &)
 Construct from Istream. More...
 
 PairCollisionRecord (const PairCollisionRecord &)
 Copy constructor. More...
 
 ~PairCollisionRecord ()
 Destructor. More...
 
label origProcOfOther () const
 Return the origProcOfOther data. More...
 
label origIdOfOther () const
 Return the origIdOfOther data. More...
 
const Type & collisionData () const
 Return access to the collision data. More...
 
Type & collisionData ()
 Return access to the collision data. More...
 
bool match (label queryOrigProcOfOther, label queryOrigIdOfOther) const
 
bool accessed () const
 Return the accessed status of the record. More...
 
void setAccessed ()
 Set the accessed property of the record to accessed. More...
 
void setUnaccessed ()
 Set the accessed property of the record to unaccessed. More...
 
void operator= (const PairCollisionRecord &)
 

Friends

bool operator== (const PairCollisionRecord< Type > &, const PairCollisionRecord< Type > &)
 
bool operator!= (const PairCollisionRecord< Type > &, const PairCollisionRecord< Type > &)
 
Istreamoperator>> (Istream &, PairCollisionRecord< Type > &)
 
Ostreamoperator (Ostream &, const PairCollisionRecord< Type > &)
 

Detailed Description

template<class Type>
class Foam::PairCollisionRecord< Type >

Record of a collision between the particle holding the record and the particle with the stored id.

The access status of the record is to be coded in the origProcOfOther data member. The actual processor is offset by +1. A negative value means that the record has not been accessed, positive means that it has.

Source files

Definition at line 56 of file PairCollisionRecord.H.

Constructor & Destructor Documentation

◆ PairCollisionRecord() [1/4]

Construct null.

Definition at line 31 of file PairCollisionRecord.C.

Referenced by PairCollisionRecord< Type >::PairCollisionRecord().

Here is the caller graph for this function:

◆ PairCollisionRecord() [2/4]

PairCollisionRecord ( bool  accessed,
label  origProcOfOther,
label  origIdOfOther,
const Type &  data = pTraits<Type>::zero 
)

Construct from components.

Definition at line 41 of file PairCollisionRecord.C.

References PairCollisionRecord< Type >::PairCollisionRecord(), and PairCollisionRecord< Type >::setUnaccessed().

Here is the call graph for this function:

◆ PairCollisionRecord() [3/4]

Construct from Istream.

Definition at line 32 of file PairCollisionRecordIO.C.

References IOstream::check(), Foam::operator>>(), and token::SPACE.

Here is the call graph for this function:

◆ PairCollisionRecord() [4/4]

Copy constructor.

◆ ~PairCollisionRecord()

Destructor.

Definition at line 76 of file PairCollisionRecord.C.

Member Function Documentation

◆ origProcOfOther()

Foam::label origProcOfOther ( ) const
inline

Return the origProcOfOther data.

Definition at line 44 of file PairCollisionRecordI.H.

References Foam::mag().

Here is the call graph for this function:

◆ origIdOfOther()

Foam::label origIdOfOther ( ) const
inline

Return the origIdOfOther data.

Definition at line 51 of file PairCollisionRecordI.H.

◆ collisionData() [1/2]

const Type & collisionData ( ) const
inline

Return access to the collision data.

Definition at line 59 of file PairCollisionRecordI.H.

◆ collisionData() [2/2]

Type & collisionData ( )
inline

Return access to the collision data.

Definition at line 66 of file PairCollisionRecordI.H.

◆ match()

bool match ( label  queryOrigProcOfOther,
label  queryOrigIdOfOther 
) const
inline

Definition at line 30 of file PairCollisionRecordI.H.

Referenced by CollisionRecordList< vector, vector >::checkPairRecord(), and CollisionRecordList< vector, vector >::matchPairRecord().

Here is the caller graph for this function:

◆ accessed()

bool accessed ( ) const
inline

Return the accessed status of the record.

Definition at line 73 of file PairCollisionRecordI.H.

References Foam::pos0().

Here is the call graph for this function:

◆ setAccessed()

void setAccessed ( )
inline

Set the accessed property of the record to accessed.

Definition at line 80 of file PairCollisionRecordI.H.

Referenced by CollisionRecordList< vector, vector >::matchPairRecord().

Here is the caller graph for this function:

◆ setUnaccessed()

void setUnaccessed ( )
inline

Set the accessed property of the record to unaccessed.

Definition at line 87 of file PairCollisionRecordI.H.

Referenced by PairCollisionRecord< Type >::PairCollisionRecord().

Here is the caller graph for this function:

◆ operator=()

void operator= ( const PairCollisionRecord< Type > &  )

Definition at line 84 of file PairCollisionRecord.C.

References Foam::abort(), Foam::FatalError, and FatalErrorInFunction.

Here is the call graph for this function:

Friends And Related Function Documentation

◆ operator==

bool operator== ( const PairCollisionRecord< Type > &  ,
const PairCollisionRecord< Type > &   
)
friend

◆ operator!=

bool operator!= ( const PairCollisionRecord< Type > &  ,
const PairCollisionRecord< Type > &   
)
friend

◆ operator>>

Istream& operator>> ( Istream ,
PairCollisionRecord< Type > &   
)
friend

◆ operator

Ostream& operator ( Ostream ,
const PairCollisionRecord< Type > &   
)
friend

The documentation for this class was generated from the following files: