52 #define EqOp(opName, op) \ 54 template<class T1, class T2> \ 57 void operator()(T1& x, const T2& y) const \ 66 void operator()(T& x, const T& y) const \ 107 #define Op(opName, op) \ 109 template<class T, class T1, class T2> \ 112 FOAM_NODISCARD T operator()(const T1& x, const T2& y) const \ 118 template<class T1, class T2> \ 121 FOAM_NODISCARD T1 operator()(const T1& x, const T2& y) const \ 130 FOAM_NODISCARD T operator()(const T& x, const T& y) const \ 139 #define BoolOp(opName, op) \ 141 template<class T1, class T2> \ 144 FOAM_NODISCARD bool operator()(const T1& x, const T2& y) const \ 153 FOAM_NODISCARD bool operator()(const T& x, const T& y) const \ 163 #define Bool1Op(opName, op) \ 170 opName##Op1(const T& v) : value(v) {} \ 172 FOAM_NODISCARD bool operator()(const T& x) const \ 181 #define WeightedOp(opName, op) \ 183 template<class T, class CombineOp> \ 184 class opName##WeightedOp \ 186 const CombineOp& cop_; \ 190 opName##WeightedOp(const CombineOp& cop) \ 200 const scalar weight \ 267 return (a <
b) ? -1 : (
b < a) ? 1 : 0;
278 return lerp(a,
b, t);
302 template<
class T>
struct getNameOp : nameOp<T> {};
Deprecated(2020-11) use typeOp (word.H)
dimensioned< Type > sum(const DimensionedField< Type, GeoMesh > &f1)
FOAM_NODISCARD T operator()(const T &a, const T &b, const scalar t) const
void divide(DimensionedField< Type, GeoMesh > &result, const DimensionedField< Type, GeoMesh > &f1, const DimensionedField< scalar, GeoMesh > &f2)
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
bool equal(const T &a, const T &b)
Compare two values for equality.
label max(const labelHashSet &set, label maxValue=labelMin)
Find the max value in labelHashSet, optionally limited by second argument.
dimensionedSymmTensor sqr(const dimensionedVector &dv)
#define BoolOp(opName, op)
Type minMagSqr(const UList< Type > &f1)
Three-way comparison operation of two parameters,.
dimensionedScalar stabilise(const dimensionedScalar &x, const dimensionedScalar &y)
Type maxMagSqr(const UList< Type > &f1)
static bool less(const vector &x, const vector &y)
To compare normals.
dimensioned< Type > cmptDivide(const dimensioned< Type > &, const dimensioned< Type > &)
bool notEqual(const Scalar a, const Scalar b)
const dimensionedScalar b
Wien displacement law constant: default SI units: [m.K].
FOAM_NODISCARD int operator()(const T &a, const T &b) const
label min(const labelHashSet &set, label minValue=labelMax)
Find the min value in labelHashSet, optionally limited by second argument.
#define Bool1Op(opName, op)
Scalar cmptPow(const Scalar s1, const Scalar s2)
Linear interpolation (cf. std::lerp)
dimensioned< Type > cmptMultiply(const dimensioned< Type > &, const dimensioned< Type > &)
dimensioned< Type > lerp(const dimensioned< Type > &a, const dimensioned< Type > &b, const scalar t)
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
#define WeightedOp(opName, op)
FOAM_NODISCARD T operator()(const T &a, const T &b) const
Scalar minMod(const Scalar s1, const Scalar s2)
Includes some standard C++ headers, defines global macros and templates used in multiple places by Op...
Linear interpolation (lerp) with interpolation value defined on construct.
void multiply(DimensionedField< Type, GeoMesh > &result, const DimensionedField< Type, GeoMesh > &f1, const DimensionedField< scalar, GeoMesh > &f2)
dimensioned< typename typeOfMag< Type >::type > magSqr(const dimensioned< Type > &dt)
Extract type (as a word) from an object, typically using its type() method.