Go to the documentation of this file.
28 #define TEMPLATE template<class Type, class GeoMesh>
38 template<
class Type,
class GeoMesh,
int r>
54 "pow(" + df.name() +
',' +
name(r) +
')',
63 pow<Type, r, GeoMesh>(tPow().field(), df.
field());
69 template<
class Type,
class GeoMesh,
int r>
85 "pow(" + df.name() +
',' +
name(r) +
')',
89 pow<Type, r, GeoMesh>(tPow().field(), df.
field());
96 template<
class Type,
class GeoMesh>
108 "sqr(" + df.name() +
')',
122 template<
class Type,
class GeoMesh>
134 "sqr(" + df.name() +
')',
146 template<
class Type,
class GeoMesh>
147 tmp<DimensionedField<scalar, GeoMesh> >
magSqr
158 "magSqr(" + df.name() +
')',
172 template<
class Type,
class GeoMesh>
173 tmp<DimensionedField<scalar, GeoMesh> >
magSqr
184 "magSqr(" + df.name() +
')',
196 template<
class Type,
class GeoMesh>
197 tmp<DimensionedField<scalar, GeoMesh> >
mag
208 "mag(" + df.name() +
')',
222 template<
class Type,
class GeoMesh>
223 tmp<DimensionedField<scalar, GeoMesh> >
mag
234 "mag(" + df.name() +
')',
246 template<
class Type,
class GeoMesh>
262 "cmptAv(" + df.name() +
')',
276 template<
class Type,
class GeoMesh>
293 "cmptAv(" + df.name() +
')',
304 #define UNARY_REDUCTION_FUNCTION(returnType, func, dfunc) \
306 template<class Type, class GeoMesh> \
307 dimensioned<returnType> func \
309 const DimensionedField<Type, GeoMesh>& df \
312 return dimensioned<Type> \
314 #func "(" + df.name() + ')', \
320 template<class Type, class GeoMesh> \
321 dimensioned<returnType> func \
323 const tmp<DimensionedField<Type, GeoMesh> >& tdf1 \
326 dimensioned<returnType> res = func(tdf1()); \
337 #undef UNARY_REDUCTION_FUNCTION
367 #define PRODUCT_OPERATOR(product, op, opFunc) \
369 template<class Type1, class Type2, class GeoMesh> \
370 tmp<DimensionedField<typename product<Type1, Type2>::type, GeoMesh> > \
373 const DimensionedField<Type1, GeoMesh>& df1, \
374 const DimensionedField<Type2, GeoMesh>& df2 \
377 typedef typename product<Type1, Type2>::type productType; \
378 tmp<DimensionedField<productType, GeoMesh> > tRes \
380 new DimensionedField<productType, GeoMesh> \
384 '(' + df1.name() + #op + df2.name() + ')', \
389 df1.dimensions() op df2.dimensions() \
393 Foam::opFunc(tRes().field(), df1.field(), df2.field()); \
398 template<class Type1, class Type2, class GeoMesh> \
399 tmp<DimensionedField<typename product<Type1, Type2>::type, GeoMesh> > \
402 const DimensionedField<Type1, GeoMesh>& df1, \
403 const tmp<DimensionedField<Type2, GeoMesh> >& tdf2 \
406 typedef typename product<Type1, Type2>::type productType; \
408 const DimensionedField<Type2, GeoMesh>& df2 = tdf2(); \
410 tmp<DimensionedField<productType, GeoMesh> > tRes = \
411 reuseTmpDimensionedField<productType, Type2, GeoMesh>::New \
414 '(' + df1.name() + #op + df2.name() + ')', \
415 df1.dimensions() op df2.dimensions() \
418 Foam::opFunc(tRes().field(), df1.field(), df2.field()); \
420 reuseTmpDimensionedField<productType, Type2, GeoMesh>::clear(tdf2); \
425 template<class Type1, class Type2, class GeoMesh> \
426 tmp<DimensionedField<typename product<Type1, Type2>::type, GeoMesh> > \
429 const tmp<DimensionedField<Type1, GeoMesh> >& tdf1, \
430 const DimensionedField<Type2, GeoMesh>& df2 \
433 typedef typename product<Type1, Type2>::type productType; \
435 const DimensionedField<Type1, GeoMesh>& df1 = tdf1(); \
437 tmp<DimensionedField<productType, GeoMesh> > tRes = \
438 reuseTmpDimensionedField<productType, Type1, GeoMesh>::New \
441 '(' + df1.name() + #op + df2.name() + ')', \
442 df1.dimensions() op df2.dimensions() \
445 Foam::opFunc(tRes().field(), df1.field(), df2.field()); \
447 reuseTmpDimensionedField<productType, Type1, GeoMesh>::clear(tdf1); \
452 template<class Type1, class Type2, class GeoMesh> \
453 tmp<DimensionedField<typename product<Type1, Type2>::type, GeoMesh> > \
456 const tmp<DimensionedField<Type1, GeoMesh> >& tdf1, \
457 const tmp<DimensionedField<Type2, GeoMesh> >& tdf2 \
460 typedef typename product<Type1, Type2>::type productType; \
462 const DimensionedField<Type1, GeoMesh>& df1 = tdf1(); \
463 const DimensionedField<Type2, GeoMesh>& df2 = tdf2(); \
465 tmp<DimensionedField<productType, GeoMesh> > tRes = \
466 reuseTmpTmpDimensionedField \
467 <productType, Type1, Type1, Type2, GeoMesh>::New \
471 '(' + df1.name() + #op + df2.name() + ')', \
472 df1.dimensions() op df2.dimensions() \
475 Foam::opFunc(tRes().field(), df1.field(), df2.field()); \
477 reuseTmpTmpDimensionedField \
478 <productType, Type1, Type1, Type2, GeoMesh>::clear(tdf1, tdf2); \
483 template<class Form, class Type, class GeoMesh> \
484 tmp<DimensionedField<typename product<Type, Form>::type, GeoMesh> > \
487 const DimensionedField<Type, GeoMesh>& df1, \
488 const dimensioned<Form>& dvs \
491 typedef typename product<Type, Form>::type productType; \
493 tmp<DimensionedField<productType, GeoMesh> > tRes \
495 new DimensionedField<productType, GeoMesh> \
499 '(' + df1.name() + #op + dvs.name() + ')', \
504 df1.dimensions() op dvs.dimensions() \
508 Foam::opFunc(tRes().field(), df1.field(), dvs.value()); \
513 template<class Form, class Cmpt, int nCmpt, class Type, class GeoMesh> \
514 tmp<DimensionedField<typename product<Form, Type>::type, GeoMesh> > \
517 const DimensionedField<Type, GeoMesh>& df1, \
518 const VectorSpace<Form,Cmpt,nCmpt>& vs \
521 return df1 op dimensioned<Form>(static_cast<const Form&>(vs)); \
525 template<class Form, class Type, class GeoMesh> \
526 tmp<DimensionedField<typename product<Type, Form>::type, GeoMesh> > \
529 const tmp<DimensionedField<Type, GeoMesh> >& tdf1, \
530 const dimensioned<Form>& dvs \
533 typedef typename product<Type, Form>::type productType; \
535 const DimensionedField<Type, GeoMesh>& df1 = tdf1(); \
537 tmp<DimensionedField<productType, GeoMesh> > tRes = \
538 reuseTmpDimensionedField<productType, Type, GeoMesh>::New \
541 '(' + df1.name() + #op + dvs.name() + ')', \
542 df1.dimensions() op dvs.dimensions() \
545 Foam::opFunc(tRes().field(), df1.field(), dvs.value()); \
547 reuseTmpDimensionedField<productType, Type, GeoMesh>::clear(tdf1); \
552 template<class Form, class Cmpt, int nCmpt, class Type, class GeoMesh> \
553 tmp<DimensionedField<typename product<Form, Type>::type, GeoMesh> > \
556 const tmp<DimensionedField<Type, GeoMesh> >& tdf1, \
557 const VectorSpace<Form,Cmpt,nCmpt>& vs \
560 return tdf1 op dimensioned<Form>(static_cast<const Form&>(vs)); \
564 template<class Form, class Type, class GeoMesh> \
565 tmp<DimensionedField<typename product<Form, Type>::type, GeoMesh> > \
568 const dimensioned<Form>& dvs, \
569 const DimensionedField<Type, GeoMesh>& df1 \
572 typedef typename product<Form, Type>::type productType; \
573 tmp<DimensionedField<productType, GeoMesh> > tRes \
575 new DimensionedField<productType, GeoMesh> \
579 '(' + dvs.name() + #op + df1.name() + ')', \
584 dvs.dimensions() op df1.dimensions() \
588 Foam::opFunc(tRes().field(), dvs.value(), df1.field()); \
593 template<class Form, class Cmpt, int nCmpt, class Type, class GeoMesh> \
594 tmp<DimensionedField<typename product<Form, Type>::type, GeoMesh> > \
597 const VectorSpace<Form,Cmpt,nCmpt>& vs, \
598 const DimensionedField<Type, GeoMesh>& df1 \
601 return dimensioned<Form>(static_cast<const Form&>(vs)) op df1; \
604 template<class Form, class Type, class GeoMesh> \
605 tmp<DimensionedField<typename product<Form, Type>::type, GeoMesh> > \
608 const dimensioned<Form>& dvs, \
609 const tmp<DimensionedField<Type, GeoMesh> >& tdf1 \
612 typedef typename product<Form, Type>::type productType; \
614 const DimensionedField<Type, GeoMesh>& df1 = tdf1(); \
616 tmp<DimensionedField<productType, GeoMesh> > tRes = \
617 reuseTmpDimensionedField<productType, Type, GeoMesh>::New \
620 '(' + dvs.name() + #op + df1.name() + ')', \
621 dvs.dimensions() op df1.dimensions() \
624 Foam::opFunc(tRes().field(), dvs.value(), df1.field()); \
626 reuseTmpDimensionedField<productType, Type, GeoMesh>::clear(tdf1); \
631 template<class Form, class Cmpt, int nCmpt, class Type, class GeoMesh> \
632 tmp<DimensionedField<typename product<Form, Type>::type, GeoMesh> > \
635 const VectorSpace<Form,Cmpt,nCmpt>& vs, \
636 const tmp<DimensionedField<Type, GeoMesh> >& tdf1 \
639 return dimensioned<Form>(static_cast<const Form&>(vs)) op tdf1; \
650 #undef PRODUCT_OPERATOR
#define BINARY_TYPE_OPERATOR_SF(ReturnType, Type1, Type2, Op, OpName, OpFunc)
#define BINARY_OPERATOR(ReturnType, Type1, Type2, Op, OpName, OpFunc)
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
void subtract(FieldField< Field1, typename typeOfSum< Type1, Type2 >::type > &f, const FieldField< Field1, Type1 > &f1, const FieldField< Field2, Type2 > &f2)
#define PRODUCT_OPERATOR(product, op, opFunc)
dimensioned< Type > cmptMultiply(const dimensioned< Type > &, const dimensioned< Type > &)
A class for managing temporary objects.
const Field< Type > & field() const
Type gAverage(const FieldField< Field, Type > &f)
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)
Type gSum(const FieldField< Field, Type > &f)
#define BINARY_FUNCTION(ReturnType, Type1, Type2, Func)
dimensioned< scalar > mag(const dimensioned< Type > &)
dimensionSet transform(const dimensionSet &)
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)
const Mesh & mesh() const
Return mesh.
Field< Type >::cmptType cmptType
dimensionedScalar pow(const dimensionedScalar &ds, const dimensionedScalar &expt)
dimensioned< scalar > sumMag(const DimensionedField< Type, GeoMesh > &df)
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)
#define UNARY_REDUCTION_FUNCTION(returnType, func, dfunc)
scalar gSumMag(const FieldField< Field, Type > &f)
const dimensionSet & dimensions() const
Return dimensions.
#define BINARY_TYPE_FUNCTION(ReturnType, Type1, Type2, Func)
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)
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)
Type gMin(const FieldField< Field, Type > &f)
#define BINARY_TYPE_OPERATOR_FS(ReturnType, Type1, Type2, Op, OpName, OpFunc)
static void clear(const tmp< DimensionedField< Type1, GeoMesh > > &tdf1)
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)
dimensioned< Type > min(const dimensioned< Type > &, const dimensioned< Type > &)
dimensioned< scalar > magSqr(const dimensioned< Type > &)
Type gMax(const FieldField< Field, Type > &f)
word name(const complex &)
Return a string representation of a complex.
static tmp< DimensionedField< TypeR, GeoMesh > > New(const tmp< DimensionedField< Type1, GeoMesh > > &tdf1, const word &name, const dimensionSet &dimensions)
dimensioned< Type > average(const DimensionedField< Type, GeoMesh > &df)
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
void dotdot(FieldField< Field1, typename scalarProduct< Type1, Type2 >::type > &f, const FieldField< Field1, Type1 > &f1, const FieldField< Field2, Type2 > &f2)