mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Merge remote branch 'OpenCFD/master' into olesenm
This commit is contained in:
@ -528,6 +528,34 @@ void Foam::Particle<ParticleType>::hitPatch
|
|||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * Friend Operators * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
template<class ParticleType>
|
||||||
|
bool Foam::operator==
|
||||||
|
(
|
||||||
|
const Particle<ParticleType>& pA,
|
||||||
|
const Particle<ParticleType>& pB
|
||||||
|
)
|
||||||
|
{
|
||||||
|
return
|
||||||
|
(
|
||||||
|
pA.origProc() == pB.origProc()
|
||||||
|
&& pA.origId() == pB.origId()
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
template<class ParticleType>
|
||||||
|
bool Foam::operator!=
|
||||||
|
(
|
||||||
|
const Particle<ParticleType>& pA,
|
||||||
|
const Particle<ParticleType>& pB
|
||||||
|
)
|
||||||
|
{
|
||||||
|
return !(pA == pB);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
#include "ParticleIO.C"
|
#include "ParticleIO.C"
|
||||||
|
|||||||
@ -59,6 +59,8 @@ class polyPatch;
|
|||||||
template<class ParticleType>
|
template<class ParticleType>
|
||||||
class Particle;
|
class Particle;
|
||||||
|
|
||||||
|
// Friend Operators
|
||||||
|
|
||||||
template<class ParticleType>
|
template<class ParticleType>
|
||||||
Ostream& operator<<
|
Ostream& operator<<
|
||||||
(
|
(
|
||||||
@ -66,6 +68,11 @@ Ostream& operator<<
|
|||||||
const Particle<ParticleType>&
|
const Particle<ParticleType>&
|
||||||
);
|
);
|
||||||
|
|
||||||
|
template<class ParticleType>
|
||||||
|
bool operator==(const Particle<ParticleType>&, const Particle<ParticleType>&);
|
||||||
|
|
||||||
|
template<class ParticleType>
|
||||||
|
bool operator!=(const Particle<ParticleType>&, const Particle<ParticleType>&);
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*\
|
/*---------------------------------------------------------------------------*\
|
||||||
Class Particle Declaration
|
Class Particle Declaration
|
||||||
@ -467,13 +474,25 @@ public:
|
|||||||
//- Write the particle data
|
//- Write the particle data
|
||||||
void write(Ostream& os, bool writeFields) const;
|
void write(Ostream& os, bool writeFields) const;
|
||||||
|
|
||||||
// Ostream Operator
|
// Friend Operators
|
||||||
|
|
||||||
friend Ostream& operator<< <ParticleType>
|
friend Ostream& operator<< <ParticleType>
|
||||||
(
|
(
|
||||||
Ostream&,
|
Ostream&,
|
||||||
const Particle<ParticleType>&
|
const Particle<ParticleType>&
|
||||||
);
|
);
|
||||||
|
|
||||||
|
friend bool operator== <ParticleType>
|
||||||
|
(
|
||||||
|
const Particle<ParticleType>& pA,
|
||||||
|
const Particle<ParticleType>& pB
|
||||||
|
);
|
||||||
|
|
||||||
|
friend bool operator!= <ParticleType>
|
||||||
|
(
|
||||||
|
const Particle<ParticleType>& pA,
|
||||||
|
const Particle<ParticleType>& pB
|
||||||
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user