37 scalar magpRel_=
mag(pRel_);
42 scalar cosAcceptanceAngle = magpRel/radius;
46 Info<<
"pRel_ " << pRel_ <<
" " << magpRel_ <<
nl
47 <<
"pRel " <<
pRel <<
" " << magpRel <<
nl
48 <<
"unit vector dot product " << (
pRel & pRel_)/(magpRel_*magpRel)
49 <<
nl <<
"cosAcceptanceAngle " << cosAcceptanceAngle
53 <<
"Problem with matching WallCollisionRecord." <<
nl
54 <<
"The given radius, " << radius <<
", is smaller than distance "
55 <<
"to the relative position of the WallInteractionSite, "
62 bool matched = (
pRel & pRel_)/(magpRel_*magpRel) > cosAcceptanceAngle;
120inline bool Foam::operator==
122 const WallCollisionRecord<Type>& a,
123 const WallCollisionRecord<Type>&
b
128 a.accessed_ ==
b.accessed_
129 && a.pRel_ ==
b.pRel_
130 && a.data_ ==
b.data_
136inline bool Foam::operator!=
138 const WallCollisionRecord<Type>& a,
139 const WallCollisionRecord<Type>&
b
Record of a collision between the particle holding the record and a wall face at the position relativ...
const vector & pRel() const
Return the pRel data.
bool match(const vector &pRel, scalar radius)
void setAccessed()
Set the accessed property of the record to accessed.
const Type & collisionData() const
Return access to the collision data.
bool accessed() const
Return the accessed status of the record.
void setUnaccessed()
Set the accessed property of the record to unaccessed.
static const scalar errorCosAngle
Tolerance for detecting seriously erroneous wall matches.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
messageStream Info
Information stream (stdout output on master, null elsewhere).
Ostream & endl(Ostream &os)
Add newline and flush stream.
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
errorManip< error > abort(error &err)
error FatalError
Error stream (stdout output on all processes), with additional 'FOAM FATAL ERROR' header text and sta...
constexpr char nl
The newline '\n' character (0x0a).