28 #define TEMPLATE template<template<class> class Field, class Type> 38 template<
template<
class>
class Field,
class Type>
42 const FieldField<Field, Type>& f,
46 template<
template<
class>
class Field,
class Type>
47 void T(FieldField<Field, Type>& f1,
const FieldField<Field, Type>& f2);
50 template<
template<
class>
class Field,
class Type,
direction r>
54 const FieldField<Field, Type>& vf
57 template<
template<
class>
class Field,
class Type,
direction r>
58 tmp<FieldField<Field, typename powProduct<Type, r>::type>>
65 template<
template<
class>
class Field,
class Type,
direction r>
66 tmp<FieldField<Field, typename powProduct<Type, r>::type>>
74 template<
template<
class>
class Field,
class Type>
78 const FieldField<Field, Type>& vf
81 template<
template<
class>
class Field,
class Type>
82 tmp<FieldField<Field, typename outerProduct<Type, Type>::type>>
83 sqr(
const FieldField<Field, Type>& f);
85 template<
template<
class>
class Field,
class Type>
86 tmp<FieldField<Field, typename outerProduct<Type, Type>::type>>
87 sqr(
const tmp<FieldField<Field, Type>>&
tf);
89 template<
template<
class>
class Field,
class Type>
90 void magSqr(FieldField<Field, scalar>& sf,
const FieldField<Field, Type>& f);
92 template<
template<
class>
class Field,
class Type>
93 tmp<FieldField<Field, scalar>>
magSqr(
const FieldField<Field, Type>& f);
95 template<
template<
class>
class Field,
class Type>
96 tmp<FieldField<Field, scalar>>
magSqr(
const tmp<FieldField<Field, Type>>&
tf);
98 template<
template<
class>
class Field,
class Type>
99 void mag(FieldField<Field, scalar>& sf,
const FieldField<Field, Type>& f);
101 template<
template<
class>
class Field,
class Type>
102 tmp<FieldField<Field, scalar>>
mag(
const FieldField<Field, Type>& f);
104 template<
template<
class>
class Field,
class Type>
105 tmp<FieldField<Field, scalar>>
mag(
const tmp<FieldField<Field, Type>>&
tf);
108 template<
template<
class>
class Field,
class Type>
112 const FieldField<Field, Type>& f
115 template<
template<
class>
class Field,
class Type>
116 tmp<FieldField<Field, typename FieldField<Field, Type>::cmptType>>
cmptMax 118 const FieldField<Field, Type>& f
121 template<
template<
class>
class Field,
class Type>
122 tmp<FieldField<Field, typename FieldField<Field, Type>::cmptType>>
cmptMax 124 const tmp<FieldField<Field, Type>>&
tf 128 template<
template<
class>
class Field,
class Type>
132 const FieldField<Field, Type>& f
135 template<
template<
class>
class Field,
class Type>
136 tmp<FieldField<Field, typename FieldField<Field, Type>::cmptType>>
cmptMin 138 const FieldField<Field, Type>& f
141 template<
template<
class>
class Field,
class Type>
142 tmp<FieldField<Field, typename FieldField<Field, Type>::cmptType>>
cmptMin 144 const tmp<FieldField<Field, Type>>&
tf 148 template<
template<
class>
class Field,
class Type>
152 const FieldField<Field, Type>& f
155 template<
template<
class>
class Field,
class Type>
156 tmp<FieldField<Field, typename FieldField<Field, Type>::cmptType>>
cmptAv 158 const FieldField<Field, Type>& f
161 template<
template<
class>
class Field,
class Type>
162 tmp<FieldField<Field, typename FieldField<Field, Type>::cmptType>>
cmptAv 164 const tmp<FieldField<Field, Type>>&
tf 168 template<
template<
class>
class Field,
class Type>
171 FieldField<Field, Type>& cf,
172 const FieldField<Field, Type>& f
175 template<
template<
class>
class Field,
class Type>
176 tmp<FieldField<Field, Type>>
cmptMag 178 const FieldField<Field, Type>& f
181 template<
template<
class>
class Field,
class Type>
182 tmp<FieldField<Field, Type>>
cmptMag 184 const tmp<FieldField<Field, Type>>&
tf 188 #define TMP_UNARY_FUNCTION(returnType, func) \ 190 template<template<class> class Field, class Type> \ 191 returnType func(const tmp<FieldField<Field, Type>>& tf1); 193 template<
template<
class>
class Field,
class Type>
194 Type
max(
const FieldField<Field, Type>& f);
198 template<template<class> class Field, class Type>
199 Type min(const FieldField<Field, Type>& f);
203 template<template<class> class Field, class Type>
204 Type sum(const FieldField<Field, Type>& f);
208 template<template<class> class Field, class Type>
209 scalar sumMag(const FieldField<Field, Type>& f);
213 template<template<class> class Field, class Type>
214 Type
average(const FieldField<Field, Type>& f);
219 #define G_UNARY_FUNCTION(returnType, gFunc, func, rFunc) \ 221 template<template<class> class Field, class Type> \ 222 returnType gFunc(const FieldField<Field, Type>& f); \ 223 TMP_UNARY_FUNCTION(returnType, gFunc) 230 #undef G_UNARY_FUNCTION 233 template<
template<
class>
class Field,
class Type>
234 Type
gAverage(
const FieldField<Field, Type>& f);
238 #undef TMP_UNARY_FUNCTION 268 #define PRODUCT_OPERATOR(product, op, opFunc) \ 272 template<class> class Field1, \ 273 template<class> class Field2, \ 279 FieldField<Field1, typename product<Type1, Type2>::type>& f, \ 280 const FieldField<Field1, Type1>& f1, \ 281 const FieldField<Field2, Type2>& f2 \ 286 template<class> class Field1, \ 287 template<class> class Field2, \ 291 tmp<FieldField<Field1, typename product<Type1, Type2>::type>> \ 294 const FieldField<Field1, Type1>& f1, \ 295 const FieldField<Field2, Type2>& f2 \ 298 template<template<class> class Field, class Type1, class Type2> \ 299 tmp<FieldField<Field, typename product<Type1, Type2>::type>> \ 302 const FieldField<Field, Type1>& f1, \ 303 const tmp<FieldField<Field, Type2>>& tf2 \ 308 template<class> class Field1, \ 309 template<class> class Field2, \ 313 tmp<FieldField<Field1, typename product<Type1, Type2>::type>> \ 316 const FieldField<Field1, Type1>& f1, \ 317 const tmp<FieldField<Field2, Type2>>& tf2 \ 322 template<class> class Field1, \ 323 template<class> class Field2, \ 327 tmp<FieldField<Field1, typename product<Type1, Type2>::type>> \ 330 const tmp<FieldField<Field1, Type1>>& tf1, \ 331 const FieldField<Field2, Type2>& f2 \ 336 template<class> class Field1, \ 337 template<class> class Field2, \ 341 tmp<FieldField<Field1, typename product<Type1, Type2>::type>> \ 344 const tmp<FieldField<Field1, Type1>>& tf1, \ 345 const tmp<FieldField<Field2, Type2>>& tf2 \ 350 template<class> class Field, \ 358 FieldField<Field, typename product<Type, Form>::type>& f, \ 359 const FieldField<Field, Type>& f1, \ 360 const VectorSpace<Form,Cmpt,nCmpt>& vs \ 365 template<class> class Field, \ 371 tmp<FieldField<Field, typename product<Type, Form>::type>> \ 374 const FieldField<Field, Type>& f1, \ 375 const VectorSpace<Form,Cmpt,nCmpt>& vs \ 380 template<class> class Field, \ 386 tmp<FieldField<Field, typename product<Type, Form>::type>> \ 389 const tmp<FieldField<Field, Type>>& tf1, \ 390 const VectorSpace<Form,Cmpt,nCmpt>& vs \ 395 template<class> class Field, \ 403 FieldField<Field, typename product<Form, Type>::type>& f, \ 404 const VectorSpace<Form,Cmpt,nCmpt>& vs, \ 405 const FieldField<Field, Type>& f1 \ 410 template<class> class Field, \ 416 tmp<FieldField<Field, typename product<Form, Type>::type>> \ 419 const VectorSpace<Form,Cmpt,nCmpt>& vs, \ 420 const FieldField<Field, Type>& f1 \ 425 template<class> class Field, \ 431 tmp<FieldField<Field, typename product<Form, Type>::type>> \ 434 const VectorSpace<Form,Cmpt,nCmpt>& vs, \ 435 const tmp<FieldField<Field, Type>>& tf1 \ 446 #undef PRODUCT_OPERATOR void divide(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)
#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)
#define G_UNARY_FUNCTION(returnType, gFunc, func, rFunc)
dimensioned< Type > max(const dimensioned< Type > &, const dimensioned< Type > &)
tmp< DimensionedField< typename DimensionedField< Type, GeoMesh >::cmptType, GeoMesh >> cmptAv(const DimensionedField< Type, GeoMesh > &df)
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)
#define TMP_UNARY_FUNCTION(returnType, func)
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)
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 > &)
#define BINARY_FUNCTION(ReturnType, Type1, Type2, Func)
#define PRODUCT_OPERATOR(product, op, opFunc)
dimensioned< Type > average(const DimensionedField< Type, GeoMesh > &df)
Specialisation of FieldField<T> for scalar.
dimensioned< Type > cmptMultiply(const dimensioned< Type > &, const dimensioned< Type > &)
void cmptMag(FieldField< Field, Type > &cf, const FieldField< Field, Type > &f)
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)
symmTypeOfRank< typename pTraits< arg1 >::cmptType, arg2 *direction(pTraits< arg1 >::rank) >::type type
dimensionedScalar pow(const dimensionedScalar &ds, const dimensionedScalar &expt)
void negate(FieldField< Field, Type > &res, const FieldField< Field, Type > &f)
High performance macro functions for Field<Type> algebra. These expand using either array element acc...
pTraits< Type >::cmptType cmptType
Component type.
Type gAverage(const FieldField< Field, 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)