Go to the documentation of this file.
37 bool isPointVal =
false;
38 bool isUniformVal =
false;
42 if (hasVariable(
name) && variable(
name).isType<Type>())
49 tfield = var.
cref<Type>().clone();
54 const label fldLen = tfield().size();
55 const label len = (isPointVal ? this->pointSize() : this->size());
65 <<
"Variable " <<
name
66 <<
" does not fit the size and is not a uniform value." <<
nl
67 <<
"Using average value" <<
endl;
A class for handling words, derived from Foam::string.
T returnReduce(const T &Value, const BinaryOp &bop, const int tag=Pstream::msgType(), const label comm=UPstream::worldComm)
tmp< Field< Type > > getField(const word &fieldName) const
Return named field (variable) if available.
A class for managing temporary objects.
Type gAverage(const FieldField< Field, Type > &f)
Ostream & endl(Ostream &os)
Add newline and flush stream.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
A polymorphic field/result from evaluating an expression.
word name(const complex &c)
Return string representation of complex.
bool isUniform() const
True if single, uniform value.
const Field< Type > & cref() const
Return const reference to the field.
tmp< DimensionedField< TypeR, GeoMesh > > New(const tmp< DimensionedField< TypeR, GeoMesh >> &tdf1, const word &name, const dimensionSet &dimensions)
Global function forwards to reuseTmpDimensionedField::New.
bool isPointValue(const bool isPointVal=true) const
True if representing point values, or test if same as isPointVal.
bool valid() const noexcept
#define WarningInFunction
Report a warning using Foam::Warning.