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