An expressions::exprValue (polymorphic typed union) with an additional flag for tracking Field content as uniform etc. More...
#include <exprValueFieldTag.H>
Classes | |
| struct | combineOp |
| Binary combine operator, e.g. for global reduction. More... | |
Public Member Functions | |
| exprValueFieldTag ()=default | |
| Default construct. Uniformity = empty, type = none. | |
| exprValueFieldTag (const exprValueFieldTag &)=default | |
| Copy construct. | |
| exprValueFieldTag & | operator= (const exprValueFieldTag &)=default |
| Copy assignment. | |
| template<class Type> | |
| exprValueFieldTag (const Type &val) | |
| Construct as uniform with the specified type/value. | |
| template<class Type> | |
| exprValueFieldTag (const Type *first, const Type *last) | |
| Construct from a range of values. | |
| bool | empty () const noexcept |
| True if the uniformity is "empty". | |
| bool | is_uniform () const noexcept |
| True if the uniformity is "uniform". | |
| bool | is_nonuniform () const noexcept |
| True if the uniformity is "non-uniform". | |
| const expressions::exprValue & | value () const noexcept |
| Representative (uniform) value for the field. | |
| int | compare (const exprValueFieldTag &rhs) const |
| Compare (uniformity, type, value). | |
| bool | equal (const exprValueFieldTag &rhs) const |
| Test for equality of the values. | |
| template<class Type> | |
| void | set (const Type *first, const Type *last) |
| Set value and uniformity from range of data. | |
| template<class Type> | |
| void | set_value (const Type &val) |
| Set as uniform, with specified value. | |
| template<class Type> | |
| void | set_zero () |
| Set type and zero value (does not affect uniformity). | |
| void | set_empty () |
| Set as empty with zero value, leave type unchanged. | |
| void | set_nouniform () |
| Set as non-uniform with zero value, leave type unchanged. | |
| void | reduce () |
| Inplace parallel reduction, uses worldComm. | |
| void | combine (const exprValueFieldTag &b) |
| Inplace combine - eg, for global uniformity. | |
| void | read (Istream &is) |
| Read uniformity label and the value as pair. | |
| void | write (Ostream &os) const |
| Write uniformity label and the value as pair. | |
| void | print (Ostream &os) const |
| Print description to Ostream. | |
| void | operator= (Foam::zero) |
| Assign from zero. Changes value but not type. | |
| bool | operator== (const exprValueFieldTag &) const |
| Compare (uniformity,value) for equality. | |
| bool | operator!= (const exprValueFieldTag &rhs) const |
| Compare (uniformity,value) for inequality. | |
| bool | operator< (const exprValueFieldTag &) const |
| Compare (uniformity,value). | |
Static Public Member Functions | |
| template<class Type> | |
| static exprValueFieldTag | make_empty () |
| Make an empty field tag with the specified type (zero-value). | |
| static exprValueFieldTag | returnReduce (const exprValueFieldTag &tag) |
| Perform a reduction on a copy and return the result. | |
An expressions::exprValue (polymorphic typed union) with an additional flag for tracking Field content as uniform etc.
Definition at line 50 of file exprValueFieldTag.H.
|
default |
Default construct. Uniformity = empty, type = none.
Referenced by combine(), compare(), equal(), exprValueFieldTag(), make_empty(), operator!=(), exprValueFieldTag::combineOp::operator()(), operator<(), operator=(), operator==(), and returnReduce().

|
default |
|
inlineexplicit |
Construct as uniform with the specified type/value.
Definition at line 93 of file exprValueFieldTag.H.
References set_value().

|
inlineexplicit |
Construct from a range of values.
Definition at line 102 of file exprValueFieldTag.H.
References set().

|
default |
|
inlinestatic |
Make an empty field tag with the specified type (zero-value).
Definition at line 114 of file exprValueFieldTag.H.
References exprValueFieldTag(), and set_zero().

|
noexcept |
True if the uniformity is "empty".
Definition at line 26 of file exprValueFieldTag.C.
References Foam::ListPolicy::EMPTY, and Foam::noexcept.
Referenced by combine().

|
noexcept |
True if the uniformity is "uniform".
Definition at line 35 of file exprValueFieldTag.C.
References Foam::noexcept, and Foam::ListPolicy::UNIFORM.
Referenced by combine().

|
noexcept |
True if the uniformity is "non-uniform".
Definition at line 44 of file exprValueFieldTag.C.
References Foam::noexcept, and Foam::ListPolicy::NONUNIFORM.
|
noexcept |
Representative (uniform) value for the field.
Definition at line 56 of file exprValueFieldTag.C.
References Foam::noexcept.
| int compare | ( | const exprValueFieldTag & | rhs | ) | const |
Compare (uniformity, type, value).
Definition at line 76 of file exprValueFieldTag.C.
References exprValueFieldTag(), and Foam::rhs().
Referenced by operator<().


| bool equal | ( | const exprValueFieldTag & | rhs | ) | const |
Test for equality of the values.
Definition at line 96 of file exprValueFieldTag.C.
References exprValueFieldTag(), and Foam::rhs().
Referenced by combine().


|
inline |
Set value and uniformity from range of data.
Definition at line 161 of file exprValueFieldTag.H.
References Foam::ListPolicy::check_uniformity(), and set().
Referenced by exprValueFieldTag(), and set().


|
inline |
Set as uniform, with specified value.
Definition at line 180 of file exprValueFieldTag.H.
References Foam::ListPolicy::UNIFORM.
Referenced by exprValueFieldTag().

|
inline |
Set type and zero value (does not affect uniformity).
Definition at line 190 of file exprValueFieldTag.H.
Referenced by make_empty().

| void set_empty | ( | ) |
Set as empty with zero value, leave type unchanged.
Definition at line 62 of file exprValueFieldTag.C.
References Foam::ListPolicy::EMPTY.
| void set_nouniform | ( | ) |
Set as non-uniform with zero value, leave type unchanged.
Definition at line 69 of file exprValueFieldTag.C.
References Foam::ListPolicy::NONUNIFORM.
Referenced by combine(), and reduce().

| void reduce | ( | ) |
Inplace parallel reduction, uses worldComm.
Definition at line 105 of file exprValueFieldTag.C.
References Foam::ListPolicy::EMPTY, UPstream::is_parallel(), UPstream::msgType(), Foam::reduce(), set_nouniform(), Foam::ListPolicy::UNIFORM, and UPstream::worldComm.
Referenced by returnReduce().


|
static |
Perform a reduction on a copy and return the result.
Definition at line 174 of file exprValueFieldTag.C.
References exprValueFieldTag(), and reduce().

| void combine | ( | const exprValueFieldTag & | b | ) |
Inplace combine - eg, for global uniformity.
Definition at line 185 of file exprValueFieldTag.C.
References b, empty(), equal(), exprValueFieldTag(), is_uniform(), and set_nouniform().
Referenced by exprValueFieldTag::combineOp::operator()().


| void read | ( | Istream & | is | ) |
Read uniformity label and the value as pair.
Definition at line 246 of file exprValueFieldTag.C.
References Istream::readBegin(), and Istream::readEnd().

| void write | ( | Ostream & | os | ) | const |
Write uniformity label and the value as pair.
Definition at line 260 of file exprValueFieldTag.C.
References token::BEGIN_LIST, token::END_LIST, os(), and token::SPACE.

| void print | ( | Ostream & | os | ) | const |
Print description to Ostream.
Definition at line 269 of file exprValueFieldTag.C.
References os().

|
inline |
Assign from zero. Changes value but not type.
Definition at line 267 of file exprValueFieldTag.H.
| bool operator== | ( | const exprValueFieldTag & | rhs | ) | const |
Compare (uniformity,value) for equality.
Definition at line 220 of file exprValueFieldTag.C.
References exprValueFieldTag(), and Foam::rhs().

|
inline |
Compare (uniformity,value) for inequality.
Definition at line 277 of file exprValueFieldTag.H.
References exprValueFieldTag(), and Foam::rhs().

| bool operator< | ( | const exprValueFieldTag & | rhs | ) | const |
Compare (uniformity,value).
Definition at line 237 of file exprValueFieldTag.C.
References compare(), exprValueFieldTag(), and Foam::rhs().
