88 if (uniformity_ != rhs.uniformity_)
91 return (
int(uniformity_) -
int(rhs.uniformity_));
99 return value_.compare(rhs.value_);
108 return (value_ == rhs.value_);
128 typedef unsigned char bitmask_type;
130 bitmask_type shape =
static_cast<bitmask_type
>(uniformity_);
146 shape == static_cast<bitmask_type>
157 shape == static_cast<bitmask_type>
167 exprValueFieldTag::combineOp{},
183 const exprValueFieldTag& tag
228 operator==(
const exprValueFieldTag& rhs)
const 230 if (uniformity_ != rhs.uniformity_)
235 else if (
this == &rhs)
240 return (value_ == rhs.value_);
245 operator<(
const exprValueFieldTag& rhs)
const 247 return (this->compare(rhs) < 0);
260 uniformity_ = int(uniformTag);
271 value_.write(
os,
false);
279 << label(uniformity_)
280 <<
" type:" << label(value_.typeCode())
281 <<
" value: " << value_ <<
" }";
288 expressions::exprValueFieldTag& tag
299 const expressions::exprValueFieldTag& tag
Inter-processor communication reduction functions.
void set_empty()
Set as empty with zero value, leave type unchanged.
void write(Ostream &os) const
Write uniformity label and the value as pair.
bool readBegin(const char *funcName)
Begin read of data chunk, starts with '('.
A polymorphic typed union of simple primitive and VectorSpace types. It uses a 'fatter' representatio...
An Istream is an abstract base class for all input systems (streams, files, token lists etc)...
int compare(const exprValueFieldTag &rhs) const
Compare (uniformity, type, value)
Begin list [isseparator].
void set_nouniform()
Set as non-uniform with zero value, leave type unchanged.
static int & msgType() noexcept
Message tag of standard messages.
static label worldComm
Communicator for all ranks. May differ from commGlobal() if local worlds are in use.
void read(Istream &is)
Read uniformity label and the value as pair.
Container (non-empty) with different values.
void combine(const exprValueFieldTag &b)
Inplace combine - eg, for global uniformity.
static exprValueFieldTag returnReduce(const exprValueFieldTag &tag)
Perform a reduction on a copy and return the result.
const expressions::exprValue & value() const noexcept
Representative (uniform) value for the field.
virtual Istream & read(token &)=0
Return next token from stream.
const dimensionedScalar b
Wien displacement law constant: default SI units: [m.K].
virtual bool write(const token &tok)=0
Write token to stream or otherwise handle it.
static bool is_parallel(const label communicator=worldComm)
True if parallel algorithm or exchange is required.
bool is_uniform() const noexcept
True if the uniformity is "uniform".
An Ostream is an abstract base class for all output systems (streams, files, token lists...
bool empty() const noexcept
True if the uniformity is "empty".
void reduce()
Inplace parallel reduction, uses worldComm.
bool readEnd(const char *funcName)
End read of data chunk, ends with ')'.
OBJstream os(runTime.globalPath()/outputName)
bool operator==(const exprValueFieldTag &) const
Compare (uniformity,value) for equality.
bool is_nonuniform() const noexcept
True if the uniformity is "non-uniform".
An expressions::exprValue (polymorphic typed union) with an additional flag for tracking Field conten...
A class representing the concept of 0 (zero) that can be used to avoid manipulating objects known to ...
Container (non-empty) with identical values.
bool operator<(const exprValueFieldTag &) const
Compare (uniformity,value)
void print(Ostream &os) const
Print description to Ostream.
bool equal(const exprValueFieldTag &rhs) const
Test for equality of the values.
void reduce(T &value, const BinaryOp &bop, const int tag=UPstream::msgType(), const label comm=UPstream::worldComm)
Reduce inplace (cf. MPI Allreduce) using linear/tree communication schedule.