26 #define TEMPLATE template<class Type> 47 void T(Field<Type>& res,
const UList<Type>& f);
50 template<
class Type, direction r>
58 template<
class Type, direction r>
59 tmp<Field<typename powProduct<Type, r>::type>>
67 template<
class Type, direction r>
68 tmp<Field<typename powProduct<Type, r>::type>>
71 const tmp<Field<Type>>&
tf,
85 tmp<Field<typename outerProduct<Type, Type>::type>>
86 sqr(
const UList<Type>& f);
89 tmp<Field<typename outerProduct<Type, Type>::type>>
90 sqr(
const tmp<Field<Type>>&
tf);
94 void magSqr(Field<scalar>& res,
const UList<Type>& f);
97 tmp<Field<scalar>>
magSqr(
const UList<Type>& f);
100 tmp<Field<scalar>>
magSqr(
const tmp<Field<Type>>&
tf);
104 void mag(Field<scalar>& res,
const UList<Type>& f);
107 tmp<Field<scalar>>
mag(
const UList<Type>& f);
110 tmp<Field<scalar>>
mag(
const tmp<Field<Type>>&
tf);
117 tmp<Field<typename Field<Type>::cmptType>>
cmptMax(
const UList<Type>& f);
120 tmp<Field<typename Field<Type>::cmptType>>
128 tmp<Field<typename Field<Type>::cmptType>>
cmptMin(
const UList<Type>& f);
131 tmp<Field<typename Field<Type>::cmptType>>
139 tmp<Field<typename Field<Type>::cmptType>>
cmptAv(
const UList<Type>& f);
142 tmp<Field<typename Field<Type>::cmptType>>
cmptAv(
const tmp<Field<Type>>&
tf);
146 void cmptMag(Field<Type>& res,
const UList<Type>& f);
149 tmp<Field<Type>>
cmptMag(
const UList<Type>& f);
152 tmp<Field<Type>>
cmptMag(
const tmp<Field<Type>>&
tf);
154 #define TMP_UNARY_FUNCTION(ReturnType, Func) \ 156 template<class Type> \ 157 ReturnType Func(const tmp<Field<Type>>& tf1); 160 Type
max(
const UList<Type>& f);
165 Type
min(
const UList<Type>& f);
170 Type
sum(
const UList<Type>& f);
186 scalar
sumProd(
const UList<Type>&
f1,
const UList<Type>& f2);
189 Type
sumCmptProd(
const UList<Type>&
f1,
const UList<Type>& f2);
192 scalar
sumSqr(
const UList<Type>& f);
197 scalar
sumMag(
const UList<Type>& f);
207 Type
average(
const UList<Type>& f);
212 #define G_UNARY_FUNCTION(ReturnType, gFunc, Func, rFunc) \ 214 template<class Type> \ 215 ReturnType gFunc(const UList<Type>& f, const label comm = UPstream::worldComm);\ 216 TMP_UNARY_FUNCTION(ReturnType, gFunc) 227 #undef G_UNARY_FUNCTION 232 const UList<Type>&
f1,
233 const UList<Type>& f2,
240 const UList<Type>&
f1,
241 const UList<Type>& f2,
248 const UList<Type>& f,
254 #undef TMP_UNARY_FUNCTION 284 #define PRODUCT_OPERATOR(product, Op, OpFunc) \ 286 template<class Type1, class Type2> \ 289 Field<typename product<Type1, Type2>::type>& res, \ 290 const UList<Type1>& f1, \ 291 const UList<Type2>& f2 \ 294 template<class Type1, class Type2> \ 295 tmp<Field<typename product<Type1, Type2>::type>> \ 296 operator Op(const UList<Type1>& f1, const UList<Type2>& f2); \ 298 template<class Type1, class Type2> \ 299 tmp<Field<typename product<Type1, Type2>::type>> \ 300 operator Op(const UList<Type1>& f1, const tmp<Field<Type2>>& tf2); \ 302 template<class Type1, class Type2> \ 303 tmp<Field<typename product<Type1, Type2>::type>> \ 304 operator Op(const tmp<Field<Type1>>& tf1, const UList<Type2>& f2); \ 306 template<class Type1, class Type2> \ 307 tmp<Field<typename product<Type1, Type2>::type>> \ 308 operator Op(const tmp<Field<Type1>>& tf1, const tmp<Field<Type2>>& tf2); \ 310 template<class Type, class Form, class Cmpt, direction nCmpt> \ 313 Field<typename product<Type, Form>::type>& res, \ 314 const UList<Type>& f1, \ 315 const VectorSpace<Form,Cmpt,nCmpt>& vs \ 318 template<class Type, class Form, class Cmpt, direction nCmpt> \ 319 tmp<Field<typename product<Type, Form>::type>> \ 320 operator Op(const UList<Type>& f1, const VectorSpace<Form,Cmpt,nCmpt>& vs); \ 322 template<class Type, class Form, class Cmpt, direction nCmpt> \ 323 tmp<Field<typename product<Type, Form>::type>> \ 324 operator Op(const tmp<Field<Type>>&tf1,const VectorSpace<Form,Cmpt,nCmpt>&vs); \ 326 template<class Form, class Cmpt, direction nCmpt, class Type> \ 329 Field<typename product<Form, Type>::type>& res, \ 330 const VectorSpace<Form,Cmpt,nCmpt>& vs, \ 331 const UList<Type>& f1 \ 334 template<class Form, class Cmpt, direction nCmpt, class Type> \ 335 tmp<Field<typename product<Form, Type>::type>> \ 336 operator Op(const VectorSpace<Form,Cmpt,nCmpt>& vs, const UList<Type>& f1); \ 338 template<class Form, class Cmpt, direction nCmpt, class Type> \ 339 tmp<Field<typename product<Form, Type>::type>> \ 340 operator Op(const VectorSpace<Form,Cmpt,nCmpt>&vs,const tmp<Field<Type>>&tf1); 350 #undef PRODUCT_OPERATOR void divide(FieldField< Field, Type > &f, const FieldField< Field, Type > &f1, const FieldField< Field, scalar > &f2)
scalar gSumMag(const FieldField< Field, Type > &f)
void cmptMax(FieldField< Field, typename FieldField< Field, Type >::cmptType > &cf, const FieldField< Field, Type > &f)
#define BINARY_OPERATOR(ReturnType, Type1, Type2, Op, OpName, OpFunc)
void multiply(FieldField< Field, Type > &f, const FieldField< Field, Type > &f1, const FieldField< Field, scalar > &f2)
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
dimensioned< Type > max(const dimensioned< Type > &, const dimensioned< Type > &)
Type gMin(const FieldField< Field, Type > &f)
tmp< DimensionedField< typename DimensionedField< Type, GeoMesh >::cmptType, GeoMesh >> cmptAv(const DimensionedField< Type, GeoMesh > &df)
Type minMagSqr(const UList< Type > &f)
dimensionedSymmTensor sqr(const dimensionedVector &dv)
pTraits< Type >::cmptType cmptType
Component type.
#define BINARY_TYPE_OPERATOR_SF(ReturnType, Type1, Type2, Op, OpName, OpFunc)
Type gSumCmptMag(const UList< Type > &f, const label comm)
#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)
typeOfRank< typename pTraits< arg1 >::cmptType, direction(pTraits< arg1 >::rank)+direction(pTraits< arg2 >::rank) >::type type
#define BINARY_TYPE_FUNCTION(ReturnType, Type1, Type2, Func)
static label worldComm
Default communicator (all processors)
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)
Type sumCmptProd(const UList< Type > &f1, const UList< Type > &f2)
void outer(FieldField< Field1, typename outerProduct< Type1, Type2 >::type > &f, const FieldField< Field1, Type1 > &f1, const FieldField< Field2, Type2 > &f2)
#define G_UNARY_FUNCTION(ReturnType, gFunc, Func, rFunc)
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 > &)
dimensioned< Type > sum(const DimensionedField< Type, GeoMesh > &df)
scalar sumProd(const UList< Type > &f1, const UList< Type > &f2)
Type gMaxMagSqr(const UList< Type > &f, const label comm)
#define BINARY_FUNCTION(ReturnType, Type1, Type2, Func)
Type gMinMagSqr(const UList< Type > &f, const label comm)
Type gSumCmptProd(const UList< Type > &f1, const UList< Type > &f2, const label comm)
Type gSum(const FieldField< Field, Type > &f)
Type sumCmptMag(const UList< Type > &f)
scalar gSumSqr(const UList< Type > &f, const label comm)
dimensioned< Type > average(const DimensionedField< Type, GeoMesh > &df)
scalar gSumProd(const UList< Type > &f1, const UList< Type > &f2, const label comm)
dimensioned< Type > cmptMultiply(const dimensioned< Type > &, const dimensioned< Type > &)
void cmptMag(FieldField< Field, Type > &cf, const FieldField< Field, Type > &f)
High performance macro functions for Field<Type> algebra. These expand using either array element acc...
dimensioned< scalar > magSqr(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)
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
dimensioned< Type > min(const dimensioned< Type > &, const dimensioned< Type > &)
symmTypeOfRank< typename pTraits< arg1 >::cmptType, arg2 *direction(pTraits< arg1 >::rank) >::type type
dimensionedScalar pow(const dimensionedScalar &ds, const dimensionedScalar &expt)
scalar sumSqr(const UList< Type > &f)
void negate(FieldField< Field, Type > &res, const FieldField< Field, Type > &f)
Type gAverage(const FieldField< Field, Type > &f)
Type maxMagSqr(const UList< Type > &f)
dimensioned< scalar > mag(const dimensioned< Type > &)
#define UNARY_OPERATOR(ReturnType, Type1, Op, OpFunc, Dfunc)
void cmptMin(FieldField< Field, typename FieldField< Field, Type >::cmptType > &cf, const FieldField< Field, Type > &f)
void component(FieldField< Field, typename FieldField< Field, Type >::cmptType > &sf, const FieldField< Field, Type > &f, const direction d)
#define PRODUCT_OPERATOR(product, Op, OpFunc)
#define TMP_UNARY_FUNCTION(ReturnType, Func)
dimensioned< scalar > sumMag(const DimensionedField< Type, GeoMesh > &df)