29#define TEMPLATE template<class Type>
51void T(Field<Type>& res,
const UList<Type>&
f);
54template<
class Type, direction r>
62template<
class Type, direction r>
63tmp<Field<typename powProduct<Type, r>::type>>
71template<
class Type, direction r>
72tmp<Field<typename powProduct<Type, r>::type>>
75 const tmp<Field<Type>>& tf,
89tmp<Field<typename outerProduct<Type, Type>::type>>
90sqr(
const UList<Type>&
f);
93tmp<Field<typename outerProduct<Type, Type>::type>>
94sqr(
const tmp<Field<Type>>& tf);
105tmp<Field<typename typeOfMag<Type>::type>>
109tmp<Field<typename typeOfMag<Type>::type>>
110magSqr(
const tmp<Field<Type>>& tf);
121tmp<Field<typename typeOfMag<Type>::type>>
122mag(
const UList<Type>&
f);
125tmp<Field<typename typeOfMag<Type>::type>>
126mag(
const tmp<Field<Type>>& tf);
133tmp<Field<typename Field<Type>::cmptType>>
cmptMax(
const UList<Type>&
f);
136tmp<Field<typename Field<Type>::cmptType>>
137cmptMax(
const tmp<Field<Type>>& tf);
144tmp<Field<typename Field<Type>::cmptType>>
cmptMin(
const UList<Type>&
f);
147tmp<Field<typename Field<Type>::cmptType>>
148cmptMin(
const tmp<Field<Type>>& tf);
155tmp<Field<typename Field<Type>::cmptType>>
cmptAv(
const UList<Type>&
f);
158tmp<Field<typename Field<Type>::cmptType>>
cmptAv(
const tmp<Field<Type>>& tf);
162void cmptMag(Field<Type>& res,
const UList<Type>&
f);
165tmp<Field<Type>>
cmptMag(
const UList<Type>&
f);
168tmp<Field<Type>>
cmptMag(
const tmp<Field<Type>>& tf);
172void cmptMagSqr(Field<Type>& res,
const UList<Type>&
f);
178tmp<Field<Type>>
cmptMagSqr(
const tmp<Field<Type>>& tf);
181#define TMP_UNARY_FUNCTION(ReturnType, Func) \
184template<class Type> \
185ReturnType Func(const tmp<Field<Type>>& tf1);
188Type
max(
const UList<Type>&
f);
193Type
min(
const UList<Type>&
f);
198Type
sum(
const UList<Type>&
f);
226 const UList<Type>& f1,
227 const UList<Type>& f2
231Type
sumCmptProd(
const UList<Type>& f1,
const UList<Type>& f2);
256#define G_UNARY_FUNCTION(ReturnType, gFunc, Func, rFunc) \
258template<class Type> \
259ReturnType gFunc(const UList<Type>& f, const label comm = UPstream::worldComm);\
260TMP_UNARY_FUNCTION(ReturnType, gFunc)
275#undef G_UNARY_FUNCTION
281 const UList<Type>& f1,
282 const UList<Type>& f2,
289 const UList<Type>& f1,
290 const UList<Type>& f2,
297 const UList<Type>&
f,
303#undef TMP_UNARY_FUNCTION
335#define PRODUCT_OPERATOR(product, Op, OpFunc) \
337template<class Type1, class Type2> \
340 Field<typename product<Type1, Type2>::type>& res, \
341 const UList<Type1>& f1, \
342 const UList<Type2>& f2 \
345template<class Type1, class Type2> \
346tmp<Field<typename product<Type1, Type2>::type>> \
347operator Op(const UList<Type1>& f1, const UList<Type2>& f2); \
349template<class Type1, class Type2> \
350tmp<Field<typename product<Type1, Type2>::type>> \
351operator Op(const UList<Type1>& f1, const tmp<Field<Type2>>& tf2); \
353template<class Type1, class Type2> \
354tmp<Field<typename product<Type1, Type2>::type>> \
355operator Op(const tmp<Field<Type1>>& tf1, const UList<Type2>& f2); \
357template<class Type1, class Type2> \
358tmp<Field<typename product<Type1, Type2>::type>> \
359operator Op(const tmp<Field<Type1>>& tf1, const tmp<Field<Type2>>& tf2); \
361template<class Type, class Form, class Cmpt, direction nCmpt> \
364 Field<typename product<Type, Form>::type>& res, \
365 const UList<Type>& f1, \
366 const VectorSpace<Form,Cmpt,nCmpt>& vs \
369template<class Type, class Form, class Cmpt, direction nCmpt> \
370tmp<Field<typename product<Type, Form>::type>> \
371operator Op(const UList<Type>& f1, const VectorSpace<Form,Cmpt,nCmpt>& vs); \
373template<class Type, class Form, class Cmpt, direction nCmpt> \
374tmp<Field<typename product<Type, Form>::type>> \
375operator Op(const tmp<Field<Type>>&tf1,const VectorSpace<Form,Cmpt,nCmpt>&vs); \
377template<class Form, class Cmpt, direction nCmpt, class Type> \
380 Field<typename product<Form, Type>::type>& res, \
381 const VectorSpace<Form,Cmpt,nCmpt>& vs, \
382 const UList<Type>& f1 \
385template<class Form, class Cmpt, direction nCmpt, class Type> \
386tmp<Field<typename product<Form, Type>::type>> \
387operator Op(const VectorSpace<Form,Cmpt,nCmpt>& vs, const UList<Type>& f1); \
389template<class Form, class Cmpt, direction nCmpt, class Type> \
390tmp<Field<typename product<Form, Type>::type>> \
391operator Op(const VectorSpace<Form,Cmpt,nCmpt>&vs,const tmp<Field<Type>>&tf1);
401#undef PRODUCT_OPERATOR
#define BINARY_FUNCTION(ReturnType, Type1, Type2, Func)
#define BINARY_TYPE_FUNCTION_FS(ReturnType, Type1, Type2, Func)
#define UNARY_OPERATOR(ReturnType, Type1, Op, OpFunc, Dfunc)
#define BINARY_OPERATOR(ReturnType, Type1, Type2, Op, OpName, OpFunc)
#define BINARY_TYPE_OPERATOR_SF(ReturnType, Type1, Type2, Op, OpName, OpFunc)
#define BINARY_TYPE_OPERATOR_FS(ReturnType, Type1, Type2, Op, OpName, OpFunc)
#define BINARY_TYPE_FUNCTION(ReturnType, Type1, Type2, Func)
#define G_UNARY_FUNCTION(ReturnType, gFunc, func, rFunc)
#define TMP_UNARY_FUNCTION(returnType, func)
High performance macro functions for Field<Type> algebra. These expand using either array element acc...
pTraits< Type >::cmptType cmptType
Component type.
static label worldComm
Default communicator (all processors)
typeOfRank< typenamepTraits< arg1 >::cmptType, direction(pTraits< arg1 >::rank)+direction(pTraits< arg2 >::rank)>::type type
symmTypeOfRank< typenamepTraits< arg1 >::cmptType, arg2 *direction(pTraits< arg1 >::rank)>::type type
pTraits< arg1 >::cmptType type
pTraits< typenamepTraits< arg1 >::cmptType >::magType type
type
Volume classification types.
#define PRODUCT_OPERATOR(product, op, opFunc)
scalarProduct< Type, Type >::type gSumProd(const UList< Type > &f1, const UList< Type > &f2, const label comm)
label max(const labelHashSet &set, label maxValue=labelMin)
Find the max value in labelHashSet, optionally limited by second argument.
dimensionSet clip(const dimensionSet &ds1, const dimensionSet &ds2)
Type gSum(const FieldField< Field, Type > &f)
dimensionedSymmTensor sqr(const dimensionedVector &dv)
void component(FieldField< Field, typename FieldField< Field, Type >::cmptType > &sf, const FieldField< Field, Type > &f, const direction d)
dimensioned< Type > sum(const DimensionedField< Type, GeoMesh > &df)
void subtract(FieldField< Field1, typename typeOfSum< Type1, Type2 >::type > &f, const FieldField< Field1, Type1 > &f1, const FieldField< Field2, Type2 > &f2)
void cmptMin(FieldField< Field, typename FieldField< Field, Type >::cmptType > &cf, const FieldField< Field, Type > &f)
dimensioned< Type > cmptDivide(const dimensioned< Type > &, const dimensioned< Type > &)
Type sumCmptProd(const UList< Type > &f1, const UList< Type > &f2)
MinMax< scalar > scalarMinMax
A scalar min/max range.
dimensioned< Type > average(const DimensionedField< Type, GeoMesh > &df)
Type maxMagSqr(const UList< Type > &f)
void cmptMagSqr(Field< Type > &res, const UList< Type > &f)
void dot(FieldField< Field1, typename innerProduct< Type1, Type2 >::type > &f, const FieldField< Field1, Type1 > &f1, const FieldField< Field2, Type2 > &f2)
scalarMinMax gMinMaxMag(const FieldField< Field, Type > &f)
dimensionedScalar pow(const dimensionedScalar &ds, const dimensionedScalar &expt)
Type gMaxMagSqr(const UList< Type > &f, const label comm)
MinMax< label > minMax(const labelHashSet &set)
Find the min/max values of labelHashSet.
dimensioned< typename typeOfMag< Type >::type > sumMag(const DimensionedField< Type, GeoMesh > &df)
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
void add(FieldField< Field1, typename typeOfSum< Type1, Type2 >::type > &f, const FieldField< Field1, Type1 > &f1, const FieldField< Field2, Type2 > &f2)
complex sumProd(const UList< complex > &f1, const UList< complex > &f2)
Sum product.
label min(const labelHashSet &set, label minValue=labelMax)
Find the min value in labelHashSet, optionally limited by second argument.
void negate(FieldField< Field, Type > &res, const FieldField< Field, Type > &f)
void multiply(FieldField< Field, Type > &f, const FieldField< Field, Type > &f1, const FieldField< Field, scalar > &f2)
void cmptMax(FieldField< Field, typename FieldField< Field, Type >::cmptType > &cf, const FieldField< Field, Type > &f)
outerProduct1< Type >::type sumSqr(const UList< Type > &f)
Type gAverage(const FieldField< Field, Type > &f)
MinMax< Type > gMinMax(const FieldField< Field, Type > &f)
dimensioned< Type > cmptMultiply(const dimensioned< Type > &, const dimensioned< Type > &)
typeOfMag< Type >::type gSumMag(const FieldField< Field, Type > &f)
void dotdot(FieldField< Field1, typename scalarProduct< Type1, Type2 >::type > &f, const FieldField< Field1, Type1 > &f1, const FieldField< Field2, Type2 > &f2)
Type minMagSqr(const UList< Type > &f)
Type gMin(const FieldField< Field, Type > &f)
void cmptMag(FieldField< Field, Type > &cf, const FieldField< Field, Type > &f)
void cross(FieldField< Field1, typename crossProduct< Type1, Type2 >::type > &f, const FieldField< Field1, Type1 > &f1, const FieldField< Field2, Type2 > &f2)
outerProduct1< Type >::type gSumSqr(const UList< Type > &f, const label comm)
tmp< DimensionedField< typename DimensionedField< Type, GeoMesh >::cmptType, GeoMesh > > cmptAv(const DimensionedField< Type, GeoMesh > &df)
Type gMinMagSqr(const UList< Type > &f, const label comm)
dimensioned< scalarMinMax > minMaxMag(const DimensionedField< Type, GeoMesh > &df)
Type gSumCmptMag(const UList< Type > &f, const label comm)
Type gMax(const FieldField< Field, Type > &f)
void divide(FieldField< Field, Type > &f, const FieldField< Field, Type > &f1, const FieldField< Field, scalar > &f2)
Type sumCmptMag(const UList< Type > &f)
dimensioned< typename typeOfMag< Type >::type > magSqr(const dimensioned< Type > &dt)
void outer(FieldField< Field1, typename outerProduct< Type1, Type2 >::type > &f, const FieldField< Field1, Type1 > &f1, const FieldField< Field2, Type2 > &f2)
Type gSumCmptProd(const UList< Type > &f1, const UList< Type > &f2, const label comm)