33 template<class> class PrimitiveField \
40 template<class> class PrimitiveField1, \
41 template<class> class PrimitiveField2 \
56 template<
class>
class PrimitiveField,
59 tmp<DimensionedField<typename powProduct<Type, r>::type, GeoMesh, Field>>
72 "pow(" + df.
name() +
',' +
name(r) +
')',
88 template<
class>
class PrimitiveField,
91 tmp<DimensionedField<typename powProduct<Type, r>::type, GeoMesh, Field>>
112 "pow(" + df.
name() +
',' +
name(r) +
')',
124 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
142 "sqr(" + df.
name() +
')',
153 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
179 "sqr(" + df.
name() +
')',
191 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
201 "magSqr(" + df.
name() +
')',
212 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
224 "magSqr(" + df.
name() +
')',
236 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
246 "mag(" + df.
name() +
')',
257 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
269 "mag(" + df.
name() +
')',
281 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
300 "cmptAv(" + df.
name() +
')',
311 template<
class Type,
class GeoMesh,
template<
class>
class PrimitiveField>
332 "cmptAv(" + df.
name() +
')',
346 #define UNARY_REDUCTION_FUNCTION(returnType, func, dfunc) \
348 template<class Type, class GeoMesh, template<class> class PrimitiveField> \
349 dimensioned<returnType> func \
351 const DimensionedField<Type, GeoMesh, PrimitiveField>& df \
354 return dimensioned<Type> \
356 #func "(" + df.name() + ')', \
358 dfunc(df.primitiveField()) \
362 template<class Type, class GeoMesh, template<class> class PrimitiveField> \
363 dimensioned<returnType> func \
365 const tmp<DimensionedField<Type, GeoMesh, PrimitiveField>>& tdf1 \
368 dimensioned<returnType> res = func(tdf1()); \
379 #undef UNARY_REDUCTION_FUNCTION
409 #define PRODUCT_OPERATOR(product, op, opFunc) \
416 template<class> class PrimitiveField1, \
417 template<class> class PrimitiveField2 \
423 typename product<Type1, Type2>::type, \
430 const DimensionedField<Type1, GeoMesh, PrimitiveField1>& df1, \
431 const DimensionedField<Type2, GeoMesh, PrimitiveField2>& df2 \
434 typedef typename product<Type1, Type2>::type productType; \
435 tmp<DimensionedField<productType, GeoMesh, Field>> tRes \
437 DimensionedField<productType, GeoMesh, Field>::New \
439 '(' + df1.name() + #op + df2.name() + ')', \
441 df1.dimensions() op df2.dimensions() \
447 tRes.ref().primitiveFieldRef(), \
448 df1.primitiveField(), \
449 df2.primitiveField() \
460 template<class> class PrimitiveField1, \
461 template<class> class PrimitiveField2 \
467 typename product<Type1, Type2>::type, \
474 const DimensionedField<Type1, GeoMesh, PrimitiveField1>& df1, \
475 const tmp<DimensionedField<Type2, GeoMesh, PrimitiveField2>>& tdf2 \
478 typedef typename product<Type1, Type2>::type productType; \
480 const DimensionedField<Type2, GeoMesh, PrimitiveField2>& df2 = tdf2(); \
482 tmp<DimensionedField<productType, GeoMesh, Field>> tRes = \
483 reuseTmpDimensionedField \
492 '(' + df1.name() + #op + df2.name() + ')', \
493 df1.dimensions() op df2.dimensions() \
498 tRes.ref().primitiveFieldRef(), \
499 df1.primitiveField(), \
500 df2.primitiveField() \
513 template<class> class PrimitiveField1, \
514 template<class> class PrimitiveField2 \
520 typename product<Type1, Type2>::type, \
527 const tmp<DimensionedField<Type1, GeoMesh, PrimitiveField1>>& tdf1, \
528 const DimensionedField<Type2, GeoMesh, PrimitiveField2>& df2 \
531 typedef typename product<Type1, Type2>::type productType; \
533 const DimensionedField<Type1, GeoMesh, PrimitiveField1>& df1 = tdf1(); \
535 tmp<DimensionedField<productType, GeoMesh, Field>> tRes = \
536 reuseTmpDimensionedField \
545 '(' + df1.name() + #op + df2.name() + ')', \
546 df1.dimensions() op df2.dimensions() \
551 tRes.ref().primitiveFieldRef(), \
552 df1.primitiveField(), \
553 df2.primitiveField() \
566 template<class> class PrimitiveField1, \
567 template<class> class PrimitiveField2 \
573 typename product<Type1, Type2>::type, \
580 const tmp<DimensionedField<Type1, GeoMesh, PrimitiveField1>>& tdf1, \
581 const tmp<DimensionedField<Type2, GeoMesh, PrimitiveField2>>& tdf2 \
584 typedef typename product<Type1, Type2>::type productType; \
586 const DimensionedField<Type1, GeoMesh, PrimitiveField1>& df1 = tdf1(); \
587 const DimensionedField<Type2, GeoMesh, PrimitiveField2>& df2 = tdf2(); \
589 tmp<DimensionedField<productType, GeoMesh>> tRes = \
590 reuseTmpTmpDimensionedField \
602 '(' + df1.name() + #op + df2.name() + ')', \
603 df1.dimensions() op df2.dimensions() \
608 tRes.ref().primitiveFieldRef(), \
609 df1.primitiveField(), \
610 df2.primitiveField() \
624 template<class> class PrimitiveField \
626 tmp<DimensionedField<typename product<Type, Form>::type, GeoMesh, Field>> \
629 const DimensionedField<Type, GeoMesh, PrimitiveField>& df1, \
630 const dimensioned<Form>& dvs \
633 typedef typename product<Type, Form>::type productType; \
635 tmp<DimensionedField<productType, GeoMesh, Field>> tRes \
637 DimensionedField<productType, GeoMesh, Field>::New \
639 '(' + df1.name() + #op + dvs.name() + ')', \
641 df1.dimensions() op dvs.dimensions() \
647 tRes.ref().primitiveFieldRef(), \
648 df1.primitiveField(), \
662 template<class> class PrimitiveField \
664 tmp<DimensionedField<typename product<Form, Type>::type, GeoMesh, Field>> \
667 const DimensionedField<Type, GeoMesh, PrimitiveField>& df1, \
668 const VectorSpace<Form,Cmpt,nCmpt>& vs \
671 return df1 op dimensioned<Form>(static_cast<const Form&>(vs)); \
680 template<class> class PrimitiveField \
682 tmp<DimensionedField<typename product<Type, Form>::type, GeoMesh, Field>> \
685 const tmp<DimensionedField<Type, GeoMesh, PrimitiveField>>& tdf1, \
686 const dimensioned<Form>& dvs \
689 typedef typename product<Type, Form>::type productType; \
691 const DimensionedField<Type, GeoMesh, PrimitiveField>& df1 = tdf1(); \
693 tmp<DimensionedField<productType, GeoMesh, Field>> tRes = \
694 reuseTmpDimensionedField \
703 '(' + df1.name() + #op + dvs.name() + ')', \
704 df1.dimensions() op dvs.dimensions() \
709 tRes.ref().primitiveFieldRef(), \
710 df1.primitiveField(), \
726 template<class> class PrimitiveField \
728 tmp<DimensionedField<typename product<Form, Type>::type, GeoMesh, Field>> \
731 const tmp<DimensionedField<Type, GeoMesh, PrimitiveField>>& tdf1, \
732 const VectorSpace<Form,Cmpt,nCmpt>& vs \
735 return tdf1 op dimensioned<Form>(static_cast<const Form&>(vs)); \
744 template<class> class PrimitiveField \
746 tmp<DimensionedField<typename product<Form, Type>::type, GeoMesh, Field>> \
749 const dimensioned<Form>& dvs, \
750 const DimensionedField<Type, GeoMesh, PrimitiveField>& df1 \
753 typedef typename product<Form, Type>::type productType; \
754 tmp<DimensionedField<productType, GeoMesh, Field>> tRes \
756 DimensionedField<productType, GeoMesh, Field>::New \
758 '(' + dvs.name() + #op + df1.name() + ')', \
760 dvs.dimensions() op df1.dimensions() \
766 tRes.ref().primitiveFieldRef(), \
768 df1.primitiveField() \
781 template<class> class PrimitiveField \
783 tmp<DimensionedField<typename product<Form, Type>::type, GeoMesh, Field>> \
786 const VectorSpace<Form,Cmpt,nCmpt>& vs, \
787 const DimensionedField<Type, GeoMesh, PrimitiveField>& df1 \
790 return dimensioned<Form>(static_cast<const Form&>(vs)) op df1; \
798 template<class> class PrimitiveField \
800 tmp<DimensionedField<typename product<Form, Type>::type, GeoMesh, Field>> \
803 const dimensioned<Form>& dvs, \
804 const tmp<DimensionedField<Type, GeoMesh, PrimitiveField>>& tdf1 \
807 typedef typename product<Form, Type>::type productType; \
809 const DimensionedField<Type, GeoMesh, PrimitiveField>& df1 = tdf1(); \
811 tmp<DimensionedField<productType, GeoMesh, Field>> tRes = \
812 reuseTmpDimensionedField \
821 '(' + dvs.name() + #op + df1.name() + ')', \
822 dvs.dimensions() op df1.dimensions() \
827 tRes.ref().primitiveFieldRef(), \
829 df1.primitiveField() \
844 template<class> class PrimitiveField \
846 tmp<DimensionedField<typename product<Form, Type>::type, GeoMesh, Field>> \
849 const VectorSpace<Form,Cmpt,nCmpt>& vs, \
850 const tmp<DimensionedField<Type, GeoMesh, PrimitiveField>>& tdf1 \
853 return dimensioned<Form>(static_cast<const Form&>(vs)) op tdf1; \
864 #undef PRODUCT_OPERATOR
#define BINARY_TYPE_FUNCTION(ReturnType, Type1, Type2, Func)
#define UNARY_REDUCTION_FUNCTION(returnType, func, dfunc)
#define PRODUCT_OPERATOR(product, op, opFunc)
#define BINARY_TYPE_OPERATOR_FS(TYPE, op, opFunc)
#define BINARY_FUNCTION(func)
#define BINARY_OPERATOR(Template, Type, Type1, Type2, op, opFunc)
#define UNARY_OPERATOR(op, opFunc)
#define UNARY_FUNCTION(Template, Type, Type1, func)
#define BINARY_TYPE_OPERATOR_SF(TYPE, op, opFunc)
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
PrimitiveField< Type >::cmptType cmptType
Component type of the elements of the field.
const dimensionSet & dimensions() const
Return dimensions.
const Mesh & mesh() const
Return mesh.
const PrimitiveField< Type > & primitiveField() const
Return a const-reference to the primitive field.
Generic mesh wrapper used by volMesh, surfaceMesh, pointMesh etc.
const word & name() const
Return name.
typeOfRank< typename pTraits< arg1 >::cmptType, direction(pTraits< arg1 >::rank)+direction(pTraits< arg2 >::rank) >::type type
symmTypeOfRank< typename pTraits< arg1 >::cmptType, arg2 *direction(pTraits< arg1 >::rank) >::type type
static tmp< DimensionedField< TypeR, GeoMesh, Field > > New(const tmp< DimensionedField< Type1, GeoMesh, PrimitiveField >> &tdf1, const word &name, const dimensionSet &dimensions)
A class for managing temporary objects.
T & ref() const
Return non-const reference or generate a fatal error.
void subtract(LagrangianPatchField< typename typeOfSum< Type1, Type2 >::type > &f, const LagrangianPatchField< Type1 > &f1, const LagrangianPatchField< Type2 > &f2)
void dot(LagrangianPatchField< typename innerProduct< Type1, Type2 >::type > &f, const LagrangianPatchField< Type1 > &f1, const LagrangianPatchField< Type2 > &f2)
void negate(LagrangianPatchField< Type > &f, const LagrangianPatchField< Type > &f1)
void cmptMultiply(LagrangianPatchField< Type > &f, const LagrangianPatchField< Type > &f1, const LagrangianPatchField< Type > &f2)
Type gSum(const FieldField< Field, Type > &f)
void outer(LagrangianPatchField< typename outerProduct< Type1, Type2 >::type > &f, const LagrangianPatchField< Type1 > &f1, const LagrangianPatchField< Type2 > &f2)
void divide(LagrangianPatchField< Type > &f, const LagrangianPatchField< Type > &f1, const LagrangianPatchField< scalar > &f2)
void dotdot(LagrangianPatchField< typename scalarProduct< Type1, Type2 >::type > &f, const LagrangianPatchField< Type1 > &f1, const LagrangianPatchField< Type2 > &f2)
scalar gSumMag(const FieldField< Field, Type > &f)
void cmptDivide(LagrangianPatchField< Type > &f, const LagrangianPatchField< Type > &f1, const LagrangianPatchField< Type > &f2)
dimensioned< Type > average(const DimensionedField< Type, GeoMesh, PrimitiveField > &df)
dimensioned< scalar > sumMag(const DimensionedField< Type, GeoMesh, PrimitiveField > &df)
void cross(LagrangianPatchField< typename crossProduct< Type1, Type2 >::type > &f, const LagrangianPatchField< Type1 > &f1, const LagrangianPatchField< Type2 > &f2)
void mag(LagrangianPatchField< scalar > &f, const LagrangianPatchField< Type > &f1)
layerAndWeight min(const layerAndWeight &a, const layerAndWeight &b)
void pow(LagrangianPatchField< typename powProduct< Type, r >::type > &f, const LagrangianPatchField< Type > &f1)
void multiply(LagrangianPatchField< Type > &f, const LagrangianPatchField< scalar > &f1, const LagrangianPatchField< Type > &f2)
dimensionSet transform(const dimensionSet &)
void cmptAv(LagrangianPatchField< typename LagrangianPatchField< Type >::cmptType > &f, const LagrangianPatchField< Type > &f1)
dimensioned< Type > sum(const DimensionedField< Type, GeoMesh, PrimitiveField > &df)
layerAndWeight max(const layerAndWeight &a, const layerAndWeight &b)
void sqr(LagrangianPatchField< typename outerProduct< Type, Type >::type > &f, const LagrangianPatchField< Type > &f1)
Type gAverage(const FieldField< Field, Type > &f)
word name(const LagrangianState state)
Return a string representation of a Lagrangian state enumeration.
void magSqr(LagrangianPatchField< scalar > &f, const LagrangianPatchField< Type > &f1)
Type gMin(const FieldField< Field, Type > &f)
void add(LagrangianPatchField< typename typeOfSum< Type1, Type2 >::type > &f, const LagrangianPatchField< Type1 > &f1, const LagrangianPatchField< Type2 > &f2)
tmp< DimensionedField< TypeR, GeoMesh, Field > > New(const tmp< DimensionedField< TypeR, GeoMesh, Field >> &tdf1, const word &name, const dimensionSet &dimensions)
Type gMax(const FieldField< Field, Type > &f)
void cmptMag(LagrangianPatchField< Type > &f, const LagrangianPatchField< Type > &f1)