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
>
183 const exprValueFieldTag& tag
230 if (uniformity_ !=
rhs.uniformity_)
235 else if (
this == &
rhs)
240 return (value_ ==
rhs.value_);
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.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
bool readEnd(const char *funcName)
End read of data chunk, ends with ')'.
bool readBegin(const char *funcName)
Begin read of data chunk, starts with '('.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
static int & msgType() noexcept
Message tag of standard messages.
static bool is_parallel(const label communicator=worldComm)
True if parallel algorithm or exchange is required.
static label worldComm
Communicator for all ranks. May differ from commGlobal() if local worlds are in use.
An expressions::exprValue (polymorphic typed union) with an additional flag for tracking Field conten...
void set_nouniform()
Set as non-uniform with zero value, leave type unchanged.
static exprValueFieldTag returnReduce(const exprValueFieldTag &tag)
Perform a reduction on a copy and return the result.
bool empty() const noexcept
True if the uniformity is "empty".
void reduce()
Inplace parallel reduction, uses worldComm.
void print(Ostream &os) const
Print description to Ostream.
const expressions::exprValue & value() const noexcept
Representative (uniform) value for the field.
bool equal(const exprValueFieldTag &rhs) const
Test for equality of the values.
void write(Ostream &os) const
Write uniformity label and the value as pair.
void set_empty()
Set as empty with zero value, leave type unchanged.
int compare(const exprValueFieldTag &rhs) const
Compare (uniformity, type, value).
bool is_nonuniform() const noexcept
True if the uniformity is "non-uniform".
void combine(const exprValueFieldTag &b)
Inplace combine - eg, for global uniformity.
bool operator<(const exprValueFieldTag &) const
Compare (uniformity,value).
exprValueFieldTag()=default
Default construct. Uniformity = empty, type = none.
void read(Istream &is)
Read uniformity label and the value as pair.
bool operator==(const exprValueFieldTag &) const
Compare (uniformity,value) for equality.
bool is_uniform() const noexcept
True if the uniformity is "uniform".
A polymorphic typed union of simple primitive and VectorSpace types. It uses a 'fatter' representatio...
@ BEGIN_LIST
Begin list [isseparator].
@ END_LIST
End list [isseparator].
A class representing the concept of 0 (zero) that can be used to avoid manipulating objects known to ...
OBJstream os(runTime.globalPath()/outputName)
@ EMPTY
An empty container.
@ UNIFORM
Container (non-empty) with identical values.
@ NONUNIFORM
Container (non-empty) with different values.
void reduce(T &value, BinaryOp bop, const int tag=UPstream::msgType(), const int communicator=UPstream::worldComm)
Reduce inplace (cf. MPI Allreduce).
void rhs(fvMatrix< typename Expr::value_type > &m, const Expr &expression)
Binary combine operator, e.g. for global reduction.