31 #define TEMPLATE template<class Type, class GeoMesh> 41 template<
class Type,
class GeoMesh, direction r>
45 const DimensionedField<Type, GeoMesh>& f1,
49 template<
class Type,
class GeoMesh, direction r>
53 const tmp<DimensionedField<Type, GeoMesh>>& tf1,
57 template<
class Type,
class GeoMesh>
59 sqr(
const DimensionedField<Type, GeoMesh>& f1);
61 template<
class Type,
class GeoMesh>
63 sqr(
const tmp<DimensionedField<Type, GeoMesh>>& tf1);
65 template<
class Type,
class GeoMesh>
67 magSqr(
const DimensionedField<Type, GeoMesh>& f1);
69 template<
class Type,
class GeoMesh>
71 magSqr(
const tmp<DimensionedField<Type, GeoMesh>>& tf1);
73 template<
class Type,
class GeoMesh>
75 mag(
const DimensionedField<Type, GeoMesh>& f1);
77 template<
class Type,
class GeoMesh>
79 mag(
const tmp<DimensionedField<Type, GeoMesh>>& tf1);
81 template<
class Type,
class GeoMesh>
90 cmptAv(
const DimensionedField<Type, GeoMesh>& f1);
92 template<
class Type,
class GeoMesh>
101 cmptAv(
const tmp<DimensionedField<Type, GeoMesh>>& tf1);
105 #define UNARY_REDUCTION_FUNCTION(ReturnType, Func, gFunc) \ 107 template<class Type, class GeoMesh> \ 108 dimensioned<ReturnType> Func \ 110 const DimensionedField<Type, GeoMesh>& f1 \ 112 template<class Type, class GeoMesh> \ 113 dimensioned<ReturnType> Func \ 115 const tmp<DimensionedField<Type, GeoMesh>>& tf1 \ 127 #undef UNARY_REDUCTION_FUNCTION 145 template<
class Type,
class GeoMesh>
148 DimensionedField<Type, GeoMesh>& result,
149 const DimensionedField<Type, GeoMesh>& f1,
153 template<
class Type,
class GeoMesh>
154 tmp<DimensionedField<Type, GeoMesh>>
157 const DimensionedField<Type, GeoMesh>& f1,
161 template<
class Type,
class GeoMesh>
162 tmp<DimensionedField<Type, GeoMesh>>
165 const tmp<DimensionedField<Type, GeoMesh>>& tf1,
194 #define PRODUCT_OPERATOR(product, Op, OpFunc) \ 196 template<class Type1, class Type2, class GeoMesh> \ 197 tmp<DimensionedField<typename product<Type1, Type2>::type, GeoMesh>> \ 200 const DimensionedField<Type1, GeoMesh>& f1, \ 201 const DimensionedField<Type2, GeoMesh>& f2 \ 204 template<class Type1, class Type2, class GeoMesh> \ 205 tmp<DimensionedField<typename product<Type1, Type2>::type, GeoMesh>> \ 208 const DimensionedField<Type1, GeoMesh>& f1, \ 209 const tmp<DimensionedField<Type2, GeoMesh>>& tf2 \ 212 template<class Type1, class Type2, class GeoMesh> \ 213 tmp<DimensionedField<typename product<Type1, Type2>::type, GeoMesh>> \ 216 const tmp<DimensionedField<Type1, GeoMesh>>& tf1, \ 217 const DimensionedField<Type2, GeoMesh>& f2 \ 220 template<class Type1, class Type2, class GeoMesh> \ 221 tmp<DimensionedField<typename product<Type1, Type2>::type, GeoMesh>> \ 224 const tmp<DimensionedField<Type1, GeoMesh>>& tf1, \ 225 const tmp<DimensionedField<Type2, GeoMesh>>& tf2 \ 228 template<class Form, class Type, class GeoMesh> \ 229 tmp<DimensionedField<typename product<Type, Form>::type, GeoMesh>> \ 232 const DimensionedField<Type, GeoMesh>& f1, \ 233 const dimensioned<Form>& dvs \ 236 template<class Form, class Cmpt, direction nCmpt, class Type, class GeoMesh> \ 237 tmp<DimensionedField<typename product<Form, Type>::type, GeoMesh>> \ 240 const DimensionedField<Type, GeoMesh>& f1, \ 241 const VectorSpace<Form,Cmpt,nCmpt>& vs \ 244 template<class Form, class Type, class GeoMesh> \ 245 tmp<DimensionedField<typename product<Type, Form>::type, GeoMesh>> \ 248 const tmp<DimensionedField<Type, GeoMesh>>& tf1, \ 249 const dimensioned<Form>& dvs \ 252 template<class Form, class Cmpt, direction nCmpt, class Type, class GeoMesh> \ 253 tmp<DimensionedField<typename product<Form, Type>::type, GeoMesh>> \ 256 const tmp<DimensionedField<Type, GeoMesh>>& tf1, \ 257 const VectorSpace<Form,Cmpt,nCmpt>& vs \ 260 template<class Form, class Type, class GeoMesh> \ 261 tmp<DimensionedField<typename product<Form, Type>::type, GeoMesh>> \ 264 const dimensioned<Form>& dvs, \ 265 const DimensionedField<Type, GeoMesh>& f2 \ 268 template<class Form, class Cmpt, direction nCmpt, class Type, class GeoMesh> \ 269 tmp<DimensionedField<typename product<Form, Type>::type, GeoMesh>> \ 272 const VectorSpace<Form,Cmpt,nCmpt>& vs, \ 273 const DimensionedField<Type, GeoMesh>& f2 \ 276 template<class Form, class Type, class GeoMesh> \ 277 tmp<DimensionedField<typename product<Form, Type>::type, GeoMesh>> \ 280 const dimensioned<Form>& dvs, \ 281 const tmp<DimensionedField<Type, GeoMesh>>& tf2 \ 284 template<class Form, class Cmpt, direction nCmpt, class Type, class GeoMesh> \ 285 tmp<DimensionedField<typename product<Form, Type>::type, GeoMesh>> \ 288 const VectorSpace<Form,Cmpt,nCmpt>& vs, \ 289 const tmp<DimensionedField<Type, GeoMesh>>& tf2 \ 300 #undef PRODUCT_OPERATOR
dimensioned< typename typeOfMag< Type >::type > sumMag(const DimensionedField< Type, GeoMesh > &f1)
dimensioned< Type > average(const DimensionedField< Type, GeoMesh > &f1)
dimensioned< Type > sum(const DimensionedField< Type, GeoMesh > &f1)
#define BINARY_OPERATOR(ReturnType, Type1, Type2, Op, OpName, OpFunc)
void divide(DimensionedField< Type, GeoMesh > &result, const DimensionedField< Type, GeoMesh > &f1, const DimensionedField< scalar, GeoMesh > &f2)
MinMax< scalar > scalarMinMax
A scalar min/max range.
tmp< DimensionedField< typename DimensionedField< Type, GeoMesh >::cmptType, GeoMesh >> cmptAv(const DimensionedField< Type, GeoMesh > &f1)
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
Type gMin(const FieldField< Field, Type > &f)
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 BINARY_TYPE_OPERATOR_SF(ReturnType, Type1, Type2, Op, OpName, OpFunc)
#define BINARY_TYPE_OPERATOR_FS(ReturnType, Type1, Type2, Op, OpName, OpFunc)
void cross(FieldField< Field1, typename crossProduct< Type1, Type2 >::type > &f, const FieldField< Field1, Type1 > &f1, const FieldField< Field2, Type2 > &f2)
#define BINARY_TYPE_FUNCTION(ReturnType, Type1, Type2, Func)
Field< Type >::cmptType cmptType
Component type of the field elements.
void dotdot(FieldField< Field1, typename scalarProduct< Type1, Type2 >::type > &f, const FieldField< Field1, Type1 > &f1, const FieldField< Field2, Type2 > &f2)
void subtract(FieldField< Field1, typename typeOfSum< Type1, Type2 >::type > &f, const FieldField< Field1, Type1 > &f1, const FieldField< Field2, Type2 > &f2)
void outer(FieldField< Field1, typename outerProduct< Type1, Type2 >::type > &f, const FieldField< Field1, Type1 > &f1, const FieldField< Field2, Type2 > &f2)
void dot(FieldField< Field1, typename innerProduct< Type1, Type2 >::type > &f, const FieldField< Field1, Type1 > &f1, const FieldField< Field2, Type2 > &f2)
dimensioned< Type > cmptDivide(const dimensioned< Type > &, const dimensioned< Type > &)
MinMax< label > minMax(const labelHashSet &set)
Find the min/max values of labelHashSet.
#define BINARY_FUNCTION(ReturnType, Type1, Type2, Func)
Type gSum(const FieldField< Field, Type > &f)
MinMax< Type > gMinMax(const FieldField< Field, Type > &f)
void negate(DimensionedField< Type, GeoMesh > &result, const DimensionedField< Type, GeoMesh > &f1)
label min(const labelHashSet &set, label minValue=labelMax)
Find the min value in labelHashSet, optionally limited by second argument.
#define PRODUCT_OPERATOR(product, Op, OpFunc)
dimensioned< Type > cmptMultiply(const dimensioned< Type > &, const dimensioned< Type > &)
void add(FieldField< Field1, typename typeOfSum< Type1, Type2 >::type > &f, const FieldField< Field1, Type1 > &f1, const FieldField< Field2, Type2 > &f2)
Type gMax(const FieldField< Field, Type > &f)
scalarMinMax gMinMaxMag(const FieldField< Field, Type > &f)
dimensioned< Type > lerp(const dimensioned< Type > &a, const dimensioned< Type > &b, const scalar t)
typeOfMag< Type >::type gSumMag(const FieldField< Field, Type > &f)
Represents 0/1 range or concept. Used for tagged dispatch or clamping.
symmTypeOfRank< typename pTraits< arg1 >::cmptType, arg2 *direction(pTraits< arg1 >::rank) >::type type
dimensionedScalar pow(const dimensionedScalar &ds, const dimensionedScalar &expt)
dimensioned< scalarMinMax > minMaxMag(const DimensionedField< Type, GeoMesh > &f1)
Type gAverage(const FieldField< Field, Type > &f)
BINARY_TYPE_FUNCTION_FS(Type, Type, MinMax< Type >, clip)
#define UNARY_REDUCTION_FUNCTION(ReturnType, Func, gFunc)
Scalar specific part of the implementation of DimensionedField.
#define UNARY_OPERATOR(ReturnType, Type1, Op, OpFunc, Dfunc)
#define TERNARY_TYPE_FUNCTION_FFS(ReturnType, Type1, Type2, Type3, Func)
void multiply(DimensionedField< Type, GeoMesh > &result, const DimensionedField< Type, GeoMesh > &f1, const DimensionedField< scalar, GeoMesh > &f2)
dimensionSet transform(const dimensionSet &ds)
Return the argument; transformations do not change the dimensions.
#define TERNARY_FUNCTION(ReturnType, Type1, Type2, Type3, Func)
dimensioned< typename typeOfMag< Type >::type > magSqr(const dimensioned< Type > &dt)
dimensionSet clamp(const dimensionSet &a, const dimensionSet &range)
pTraits< typename pTraits< arg1 >::cmptType >::magType type