36#ifndef Foam_labelBits_H
37#define Foam_labelBits_H
69 inline static label
pack
78 <<
"Direction " <<
bits <<
" outside range 0..7"
79 <<
" or value " <<
val <<
" negative or larger than "
80 << label(8*
sizeof(label)-3) <<
" bit representation"
89 static constexpr label
pack
128 label
val() const
noexcept {
return (data_ >> 3); }
151 return a.data_ ==
b.data_;
166 return is >>
rhs.data_;
172 return os <<
rhs.data_;
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
A 29bits (or 61bits) integer label with 3bits direction (eg, octant) packed into single label.
void setBits(const direction bits)
Set the octant direction.
labelBits(Istream &is)
Read construct from Istream.
friend bool operator!=(const labelBits &a, const labelBits &b)
labelBits(const label val, const direction bits)
Construct from components.
direction bits() const noexcept
Return the octant direction.
static constexpr label pack(const label val, const direction bits) noexcept
Pack integer value and bits (octant) into a label.
constexpr labelBits() noexcept
Default construct as zero initialized.
label data() const noexcept
The raw data value.
label val() const noexcept
Return the integer value.
friend Istream & operator>>(Istream &is, labelBits &rhs)
friend Ostream & operator<<(Ostream &os, const labelBits &rhs)
friend bool operator==(const labelBits &a, const labelBits &b)
void setVal(const label val)
Set the integer value.
Direction is an 8-bit unsigned integer type used to represent Cartesian directions,...
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
OBJstream os(runTime.globalPath()/outputName)
errorManip< error > abort(error &err)
void rhs(fvMatrix< typename Expr::value_type > &m, const Expr &expression)
error FatalError
Error stream (stdout output on all processes), with additional 'FOAM FATAL ERROR' header text and sta...