BUG: pointData: check for equal

This commit is contained in:
mattijs
2013-01-11 15:57:26 +00:00
parent 56c0d7ba50
commit 2ad9f9ef9b
2 changed files with 28 additions and 2 deletions

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -148,6 +148,13 @@ public:
TrackingData& td
);
// Member Operators
// Needed for List IO
inline bool operator==(const pointData&) const;
inline bool operator!=(const pointData&) const;
// IOstream Operators
friend Ostream& operator<<(Ostream&, const pointData&);

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -215,4 +215,23 @@ inline bool Foam::pointData::updateEdge
}
// * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * //
inline bool Foam::pointData::operator==(const Foam::pointData& rhs)
const
{
return
pointEdgePoint::operator==(rhs)
&& (s() == rhs.s())
&& (v() == rhs.v());
}
inline bool Foam::pointData::operator!=(const Foam::pointData& rhs)
const
{
return !(*this == rhs);
}
// ************************************************************************* //