Go to the documentation of this file.
26 #define TEMPLATE template<class Type>
47 void T(Field<Type>& res,
const UList<Type>&
f);
50 template<
class Type,
int r>
58 template<
class Type,
int r>
67 template<
class Type,
int r>
71 const tmp<Field<Type> >&
tf,
86 sqr(
const UList<Type>&
f);
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);
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, int 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, int 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, int 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, int 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, int 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, int 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
#define BINARY_TYPE_OPERATOR_SF(ReturnType, Type1, Type2, Op, OpName, OpFunc)
#define BINARY_OPERATOR(ReturnType, Type1, Type2, Op, OpName, OpFunc)
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)
void component(FieldField< Field, typename FieldField< Field, Type >::cmptType > &sf, const FieldField< Field, Type > &f, const direction d)
scalar gSumSqr(const UList< Type > &f, const label comm)
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, int(pTraits< arg1 >::rank)+int(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)
scalar sumSqr(const UList< Type > &f)
Type gSum(const FieldField< Field, Type > &f)
#define BINARY_FUNCTION(ReturnType, Type1, Type2, Func)
dimensioned< scalar > mag(const dimensioned< Type > &)
Type sumCmptMag(const UList< Type > &f)
Type gMaxMagSqr(const UList< Type > &f, const label comm)
symmTypeOfRank< typename pTraits< arg1 >::cmptType, arg2 *int(pTraits< arg1 >::rank) >::type type
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)
pTraits< Type >::cmptType cmptType
Component type.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
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)
dimensionedScalar pow(const dimensionedScalar &ds, const dimensionedScalar &expt)
dimensioned< scalar > sumMag(const DimensionedField< Type, GeoMesh > &df)
#define G_UNARY_FUNCTION(ReturnType, gFunc, Func, rFunc)
void negate(FieldField< Field, Type > &res, const FieldField< Field, Type > &f)
void add(FieldField< Field1, typename typeOfSum< Type1, Type2 >::type > &f, const FieldField< Field1, Type1 > &f1, const FieldField< Field2, Type2 > &f2)
scalar gSumMag(const FieldField< Field, Type > &f)
#define BINARY_TYPE_FUNCTION(ReturnType, Type1, Type2, Func)
Type minMagSqr(const UList< Type > &f)
dimensioned< Type > max(const dimensioned< Type > &, const dimensioned< Type > &)
dimensioned< Type > cmptDivide(const dimensioned< Type > &, const dimensioned< Type > &)
dimensionedSymmTensor sqr(const dimensionedVector &dv)
tmp< DimensionedField< typename DimensionedField< Type, GeoMesh >::cmptType, GeoMesh >> cmptAv(const DimensionedField< Type, GeoMesh > &df)
#define UNARY_OPERATOR(ReturnType, Type1, Op, OpFunc, Dfunc)
static label worldComm
Default communicator (all processors)
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)
dimensioned< Type > sum(const DimensionedField< Type, GeoMesh > &df)
scalar gSumProd(const UList< Type > &f1, const UList< Type > &f2, const label comm)
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)
fileName::Type type(const fileName &)
Return the file type: DIRECTORY or FILE.
void cross(FieldField< Field1, typename crossProduct< Type1, Type2 >::type > &f, const FieldField< Field1, Type1 > &f1, const FieldField< Field2, Type2 > &f2)
scalar sumProd(const UList< Type > &f1, const UList< Type > &f2)
dimensioned< Type > min(const dimensioned< Type > &, const dimensioned< Type > &)
dimensioned< scalar > magSqr(const dimensioned< 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)
void dotdot(FieldField< Field1, typename scalarProduct< Type1, Type2 >::type > &f, const FieldField< Field1, Type1 > &f1, const FieldField< Field2, Type2 > &f2)