Go to the documentation of this file.
33 template<
class Tout,
class T1,
class UnaryOp>
42 if (result.size() != a.size())
45 <<
"Field sizes do not match: " << result.size() <<
" ("
46 << a.size() <<
')' <<
nl
55 template<
class Tout,
class T1,
class T2,
class BinaryOp>
65 if (result.size() != a.size() || result.size() !=
b.size())
68 <<
"Field sizes do not match: " << result.size() <<
" ("
69 << a.size() <<
' ' <<
b.size() <<
')' <<
nl
78 template<
class T,
class BinaryOp>
88 if (result.size() != a.size() || result.size() !=
b.size())
91 <<
"Field sizes do not match: " << result.size() <<
" ("
92 << a.size() <<
' ' <<
b.size() <<
')' <<
nl
99 result[i] = bop(a[i],
b[i]) ? a[i] :
b[i];
104 template<
class T,
class BoolListType,
class FlipOp>
108 const BoolListType& cond,
115 if (result.size() != a.size() || result.size() !=
b.size())
118 <<
"Field sizes do not match: " << result.size() <<
" ("
119 << a.size() <<
' ' <<
b.size() <<
')' <<
nl
126 result[i] = flip(cond[i]) ? a[i] :
b[i];
131 template<
class T,
class FlipOp>
142 if (result.size() != a.size() || result.size() !=
b.size())
145 <<
"Field sizes do not match: " << result.size() <<
" ("
146 << a.size() <<
' ' <<
b.size() <<
')' <<
nl
153 result[i] = flip(cond[i]) ? a[i] :
b[i];
158 template<
class T1,
class T2>
170 result.first() = vals[i];
171 result.second() =
data[i];
179 template<
class T1,
class T2>
182 const Field<T1>& vals,
183 const Field<T2>& data
191 result.first() = vals[i];
192 result.second() = data[i];
void ternary(Field< T > &result, const Field< T > &a, const Field< T > &b, const BinaryOp &bop)
A bitSet stores bits (elements with only two states) in packed internal format and supports a variety...
static constexpr const zero Zero
Global zero (0)
void combineReduce(const List< UPstream::commsStruct > &comms, T &Value, const CombineOp &cop, const int tag, const label comm)
void ternarySelect(Field< T > &result, const BoolListType &cond, const Field< T > &a, const Field< T > &b, const FlipOp &flip)
dimensionSet transform(const dimensionSet &ds)
Return the argument; transformations do not change the dimensions.
label min(const labelHashSet &set, label minValue=labelMax)
Find the min value in labelHashSet, optionally limited by second argument.
#define forAll(list, i)
Loop across all elements in list.
Combination-Reduction operation for a parallel run. The information from all nodes is collected on th...
const dimensionedScalar b
Wien displacement law constant: default SI units: [m.K].
Generic templated field type.
Tuple2< T1, T2 > findMinData(const Field< T1 > &vals, const Field< T2 > &data)
Locate the min value in a field and return it and associated data.
errorManip< error > abort(error &err)
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
label findMax(const ListType &input, label start=0)
A traits class, which is primarily used for primitives.
void assign(Field< Tout > &result, const Field< T1 > &a, const UnaryOp &op)
Populate a field as the result of a unary operation on an input.
A 2-tuple for storing two objects of dissimilar types. The container is similar in purpose to std::pa...
label findMin(const ListType &input, label start=0)
Database for solution data, solver performance and other reduced data.
Tuple2< T1, T2 > findMaxData(const Field< T1 > &vals, const Field< T2 > &data)
Locate the max value in a field and return it and associated data.