40#ifndef Foam_pointIndexHit_H
41#define Foam_pointIndexHit_H
53template<
class Po
intType>
56template<
class Po
intType>
70template<
class Po
intType>
176 <<
"Requested a hit point, but it was not hit"
188 <<
"Requested a miss point, but it was hit"
250 os << (hit_ ?
"hit:" :
"miss:")
251 << point_ <<
" index:" << index_;
263 && index_ ==
rhs.index_
264 && point_ ==
rhs.point_
271 return !(*
this ==
rhs);
283 reinterpret_cast<const char*
>(&pHit),
309 reinterpret_cast<char*
>(&pHit),
315 is >> pHit.hit_ >> pHit.point_ >> pHit.index_;
327template<>
struct is_contiguous<
pointIndexHit> : is_contiguous<point> {};
streamFormat format() const noexcept
Get the current stream format.
virtual bool check(const char *operation) const
Check IOstream status for given operation.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
virtual Istream & read(token &)=0
Return next token from stream.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Describes the interaction of a object and a (templated) point. It carries the info of a successful hi...
This class describes the interaction of an object (often a face) and a point. It carries the info of ...
void setHit() noexcept
Set the hit status on.
const point_type & rawPoint() const noexcept
The point, no checks. Same as point().
PointIndexHit()
Default construct. A zero point, with no hit and index = -1.
PointIndexHit(bool success, const point_type &p, label index)
Construct from components.
void setIndex(const label index) noexcept
Set the index.
PointIndexHit(const point_type &p)
Construct from a point, with no hit and index = -1.
void hitPoint(const point_type &p)
Set the point as hit without changing the hit-index.
point_type & point() noexcept
Access the point, no checks.
void setPoint(const point_type &p)
Set the point.
PointIndexHit(const PointHit< point_type > &p, label index=-1)
Construct from hitPoint with index = -1 or specified.
label index() const noexcept
void setMiss() noexcept
Set the hit status off.
const point_type & missPoint() const
Return miss point. Fatal if hit.
bool hit() const noexcept
bool operator==(const PointIndexHit &rhs) const
Test for equality of all components.
friend Istream & operator>>(Istream &is, PointIndexHit &pHit)
PointIndexHit(const PointIndexHit< point_type > &p, label index)
Copy construct with different index.
PointIndexHit(Istream &is)
Construct from Istream.
point_type & rawPoint() noexcept
The point, no checks. Same as point().
void write(Ostream &os)
Report hit/miss status, point and index.
void hitPoint(const point_type &p, const label index)
Set the point as hit and set the hit-index.
const point_type & point() const noexcept
friend Ostream & operator<<(Ostream &os, const PointIndexHit &pHit)
const point_type & hitPoint() const
Return hit point. Fatal if not hit.
bool operator!=(const PointIndexHit &rhs) const
Test for inequality of components.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
OBJstream os(runTime.globalPath()/outputName)
Ostream & operator<<(Ostream &, const boundaryPatch &p)
Write boundaryPatch as dictionary entries (without surrounding braces).
Istream & operator>>(Istream &, directionInfo &)
errorManip< error > abort(error &err)
void rhs(fvMatrix< typename Expr::value_type > &m, const Expr &expression)
static constexpr const zero Zero
Global zero (0).
error FatalError
Error stream (stdout output on all processes), with additional 'FOAM FATAL ERROR' header text and sta...
PointIndexHit< point > pointIndexHit
A PointIndexHit with a 3D point.
A template class to specify that a data type can be considered as being contiguous in memory.