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_;
label data() const noexcept
The raw data value.
error FatalError
Error stream (stdout output on all processes), with additional 'FOAM FATAL ERROR' header text and sta...
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
constexpr labelBits() noexcept
Default construct as zero initialized.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)...
static constexpr label pack(const label val, const direction bits) noexcept
Pack integer value and bits (octant) into a label.
void setVal(const label val)
Set the integer value.
const dimensionedScalar b
Wien displacement law constant: default SI units: [m.K].
void setBits(const direction bits)
Set the octant direction.
errorManip< error > abort(error &err)
An Ostream is an abstract base class for all output systems (streams, files, token lists...
friend Ostream & operator<<(Ostream &os, const labelBits &rhs)
OBJstream os(runTime.globalPath()/outputName)
friend bool operator==(const labelBits &a, const labelBits &b)
friend bool operator!=(const labelBits &a, const labelBits &b)
Direction is an 8-bit unsigned integer type used to represent Cartesian directions, components etc.
A 29bits (or 61bits) integer label with 3bits direction (eg, octant) packed into single label...
friend Istream & operator>>(Istream &is, labelBits &rhs)
label val() const noexcept
Return the integer value.
direction bits() const noexcept
Return the octant direction.