mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
contiguous data
This commit is contained in:
@ -45,7 +45,7 @@ typedef PointIndexHit<point> pointIndexHit;
|
||||
|
||||
//- Specify data associated with pointIndexHit type is contiguous
|
||||
template<>
|
||||
inline bool contiguous<pointIndexHit>() {return true;}
|
||||
inline bool contiguous<pointIndexHit>() {return contiguous<point>();}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -679,7 +679,11 @@ Foam::label Foam::treeBoundBox::distanceCmp
|
||||
|
||||
bool Foam::operator==(const treeBoundBox& a, const treeBoundBox& b)
|
||||
{
|
||||
return (a.min() == b.min()) && (a.max() == b.max());
|
||||
return operator==
|
||||
(
|
||||
static_cast<const boundBox&>(a),
|
||||
static_cast<const boundBox&>(b)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@ -689,12 +693,17 @@ bool Foam::operator!=(const treeBoundBox& a, const treeBoundBox& b)
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * IOstream Operator * * * * * * * * * * * * * //
|
||||
// * * * * * * * * * * * * * * * Ostream Operator * * * * * * * * * * * * * //
|
||||
|
||||
Foam::Ostream& Foam::operator<<(Ostream& os, const treeBoundBox& bb)
|
||||
{
|
||||
return os << static_cast<const boundBox&>(bb);
|
||||
}
|
||||
|
||||
|
||||
Foam::Istream& Foam::operator>>(Istream& is, treeBoundBox& bb)
|
||||
{
|
||||
is >> bb.min() >> bb.max();
|
||||
return is;
|
||||
return is >> static_cast<boundBox&>(bb);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -322,13 +322,19 @@ public:
|
||||
friend bool operator==(const treeBoundBox&, const treeBoundBox&);
|
||||
friend bool operator!=(const treeBoundBox&, const treeBoundBox&);
|
||||
|
||||
|
||||
// IOstream operator
|
||||
|
||||
friend Istream& operator>>(Istream&, treeBoundBox&);
|
||||
friend Istream& operator>>(Istream& is, treeBoundBox&);
|
||||
friend Ostream& operator<<(Ostream& os, const treeBoundBox&);
|
||||
|
||||
};
|
||||
|
||||
|
||||
//- Specify data associated with boundBox type is contiguous
|
||||
template<>
|
||||
inline bool contiguous<treeBoundBox>() {return contiguous<boundBox>();}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
Reference in New Issue
Block a user