Go to the documentation of this file.
29 template<class Type, template<class> class PatchField, class GeoMesh>
39 template<
class Type,
template<
class>
class PatchField,
class GeoMesh>
57 template<
class Type,
template<
class>
class PatchField,
class GeoMesh>
69 template<
class Type,
template<
class>
class PatchField,
class GeoMesh,
int r>
80 template<
class Type,
template<
class>
class PatchField,
class GeoMesh,
int r>
96 "pow(" + gf.name() +
',' +
name(r) +
')',
103 pow(gf.dimensions(), r)
107 pow<Type, r, PatchField, GeoMesh>(tPow(), gf);
113 template<
class Type,
template<
class>
class PatchField,
class GeoMesh,
int r>
131 "pow(" + gf.name() +
',' +
name(r) +
')',
138 pow(gf.dimensions(), r)
142 pow<Type, r, PatchField, GeoMesh>(tPow(), gf);
150 template<
class Type,
template<
class>
class PatchField,
class GeoMesh>
162 template<
class Type,
template<
class>
class PatchField,
class GeoMesh>
182 "sqr(" + gf.name() +
')',
198 template<
class Type,
template<
class>
class PatchField,
class GeoMesh>
220 "sqr(" + gf.name() +
')',
239 template<
class Type,
template<
class>
class PatchField,
class GeoMesh>
250 template<
class Type,
template<
class>
class PatchField,
class GeoMesh>
251 tmp<GeometricField<scalar, PatchField, GeoMesh> >
magSqr
262 "magSqr(" + gf.name() +
')',
278 template<
class Type,
template<
class>
class PatchField,
class GeoMesh>
279 tmp<GeometricField<scalar, PatchField, GeoMesh> >
magSqr
292 "magSqr(" + gf.name() +
')',
311 template<
class Type,
template<
class>
class PatchField,
class GeoMesh>
322 template<
class Type,
template<
class>
class PatchField,
class GeoMesh>
323 tmp<GeometricField<scalar, PatchField, GeoMesh> >
mag
334 "mag(" + gf.name() +
')',
350 template<
class Type,
template<
class>
class PatchField,
class GeoMesh>
351 tmp<GeometricField<scalar, PatchField, GeoMesh> >
mag
364 "mag(" + gf.name() +
')',
383 template<
class Type,
template<
class>
class PatchField,
class GeoMesh>
399 template<
class Type,
template<
class>
class PatchField,
class GeoMesh>
420 "cmptAv(" + gf.name() +
')',
436 template<
class Type,
template<
class>
class PatchField,
class GeoMesh>
459 "cmptAv(" + gf.name() +
')',
478 #define UNARY_REDUCTION_FUNCTION_WITH_BOUNDARY(returnType, func, gFunc) \
480 template<class Type, template<class> class PatchField, class GeoMesh> \
481 dimensioned<returnType> func \
483 const GeometricField<Type, PatchField, GeoMesh>& gf \
486 return dimensioned<Type> \
488 #func "(" + gf.name() + ')', \
490 Foam::func(gFunc(gf.internalField()), gFunc(gf.boundaryField())) \
494 template<class Type, template<class> class PatchField, class GeoMesh> \
495 dimensioned<returnType> func \
497 const tmp<GeometricField<Type, PatchField, GeoMesh> >& tgf1 \
500 dimensioned<returnType> res = func(tgf1()); \
508 #undef UNARY_REDUCTION_FUNCTION_WITH_BOUNDARY
511 #define UNARY_REDUCTION_FUNCTION(returnType, func, gFunc) \
513 template<class Type, template<class> class PatchField, class GeoMesh> \
514 dimensioned<returnType> func \
516 const GeometricField<Type, PatchField, GeoMesh>& gf \
519 return dimensioned<Type> \
521 #func "(" + gf.name() + ')', \
523 gFunc(gf.internalField()) \
527 template<class Type, template<class> class PatchField, class GeoMesh> \
528 dimensioned<returnType> func \
530 const tmp<GeometricField<Type, PatchField, GeoMesh> >& tgf1 \
533 dimensioned<returnType> res = func(tgf1()); \
542 #undef UNARY_REDUCTION_FUNCTION
572 #define PRODUCT_OPERATOR(product, op, opFunc) \
575 <class Type1, class Type2, template<class> class PatchField, class GeoMesh> \
579 <typename product<Type1, Type2>::type, PatchField, GeoMesh>& gf, \
580 const GeometricField<Type1, PatchField, GeoMesh>& gf1, \
581 const GeometricField<Type2, PatchField, GeoMesh>& gf2 \
584 Foam::opFunc(gf.internalField(), gf1.internalField(), gf2.internalField());\
585 Foam::opFunc(gf.boundaryField(), gf1.boundaryField(), gf2.boundaryField());\
589 <class Type1, class Type2, template<class> class PatchField, class GeoMesh> \
592 GeometricField<typename product<Type1, Type2>::type, PatchField, GeoMesh> \
596 const GeometricField<Type1, PatchField, GeoMesh>& gf1, \
597 const GeometricField<Type2, PatchField, GeoMesh>& gf2 \
600 typedef typename product<Type1, Type2>::type productType; \
601 tmp<GeometricField<productType, PatchField, GeoMesh> > tRes \
603 new GeometricField<productType, PatchField, GeoMesh> \
607 '(' + gf1.name() + #op + gf2.name() + ')', \
614 gf1.dimensions() op gf2.dimensions() \
618 Foam::opFunc(tRes(), gf1, gf2); \
624 <class Type1, class Type2, template<class> class PatchField, class GeoMesh> \
627 GeometricField<typename product<Type1, Type2>::type, PatchField, GeoMesh> \
631 const GeometricField<Type1, PatchField, GeoMesh>& gf1, \
632 const tmp<GeometricField<Type2, PatchField, GeoMesh> >& tgf2 \
635 typedef typename product<Type1, Type2>::type productType; \
637 const GeometricField<Type2, PatchField, GeoMesh>& gf2 = tgf2(); \
639 tmp<GeometricField<productType, PatchField, GeoMesh> > tRes = \
640 reuseTmpGeometricField<productType, Type2, PatchField, GeoMesh>::New \
643 '(' + gf1.name() + #op + gf2.name() + ')', \
644 gf1.dimensions() op gf2.dimensions() \
647 Foam::opFunc(tRes(), gf1, gf2); \
649 reuseTmpGeometricField<productType, Type2, PatchField, GeoMesh> \
656 <class Type1, class Type2, template<class> class PatchField, class GeoMesh> \
659 GeometricField<typename product<Type1, Type2>::type, PatchField, GeoMesh> \
663 const tmp<GeometricField<Type1, PatchField, GeoMesh> >& tgf1, \
664 const GeometricField<Type2, PatchField, GeoMesh>& gf2 \
667 typedef typename product<Type1, Type2>::type productType; \
669 const GeometricField<Type1, PatchField, GeoMesh>& gf1 = tgf1(); \
671 tmp<GeometricField<productType, PatchField, GeoMesh> > tRes = \
672 reuseTmpGeometricField<productType, Type1, PatchField, GeoMesh>::New \
675 '(' + gf1.name() + #op + gf2.name() + ')', \
676 gf1.dimensions() op gf2.dimensions() \
679 Foam::opFunc(tRes(), gf1, gf2); \
681 reuseTmpGeometricField<productType, Type1, PatchField, GeoMesh> \
688 <class Type1, class Type2, template<class> class PatchField, class GeoMesh> \
691 GeometricField<typename product<Type1, Type2>::type, PatchField, GeoMesh> \
695 const tmp<GeometricField<Type1, PatchField, GeoMesh> >& tgf1, \
696 const tmp<GeometricField<Type2, PatchField, GeoMesh> >& tgf2 \
699 typedef typename product<Type1, Type2>::type productType; \
701 const GeometricField<Type1, PatchField, GeoMesh>& gf1 = tgf1(); \
702 const GeometricField<Type2, PatchField, GeoMesh>& gf2 = tgf2(); \
704 tmp<GeometricField<productType, PatchField, GeoMesh> > tRes = \
705 reuseTmpTmpGeometricField \
706 <productType, Type1, Type1, Type2, PatchField, GeoMesh>::New \
710 '(' + gf1.name() + #op + gf2.name() + ')', \
711 gf1.dimensions() op gf2.dimensions() \
714 Foam::opFunc(tRes(), gf1, gf2); \
716 reuseTmpTmpGeometricField \
717 <productType, Type1, Type1, Type2, PatchField, GeoMesh> \
718 ::clear(tgf1, tgf2); \
724 <class Form, class Type, template<class> class PatchField, class GeoMesh> \
728 <typename product<Type, Form>::type, PatchField, GeoMesh>& gf, \
729 const GeometricField<Type, PatchField, GeoMesh>& gf1, \
730 const dimensioned<Form>& dvs \
733 Foam::opFunc(gf.internalField(), gf1.internalField(), dvs.value()); \
734 Foam::opFunc(gf.boundaryField(), gf1.boundaryField(), dvs.value()); \
738 <class Form, class Type, template<class> class PatchField, class GeoMesh> \
739 tmp<GeometricField<typename product<Type, Form>::type, PatchField, GeoMesh> > \
742 const GeometricField<Type, PatchField, GeoMesh>& gf1, \
743 const dimensioned<Form>& dvs \
746 typedef typename product<Type, Form>::type productType; \
748 tmp<GeometricField<productType, PatchField, GeoMesh> > tRes \
750 new GeometricField<productType, PatchField, GeoMesh> \
754 '(' + gf1.name() + #op + dvs.name() + ')', \
761 gf1.dimensions() op dvs.dimensions() \
765 Foam::opFunc(tRes(), gf1, dvs); \
775 class Type, template<class> class PatchField, \
778 tmp<GeometricField<typename product<Form, Type>::type, PatchField, GeoMesh> > \
781 const GeometricField<Type, PatchField, GeoMesh>& gf1, \
782 const VectorSpace<Form,Cmpt,nCmpt>& vs \
785 return gf1 op dimensioned<Form>(static_cast<const Form&>(vs)); \
790 <class Form, class Type, template<class> class PatchField, class GeoMesh> \
791 tmp<GeometricField<typename product<Type, Form>::type, PatchField, GeoMesh> > \
794 const tmp<GeometricField<Type, PatchField, GeoMesh> >& tgf1, \
795 const dimensioned<Form>& dvs \
798 typedef typename product<Type, Form>::type productType; \
800 const GeometricField<Type, PatchField, GeoMesh>& gf1 = tgf1(); \
802 tmp<GeometricField<productType, PatchField, GeoMesh> > tRes = \
803 reuseTmpGeometricField<productType, Type, PatchField, GeoMesh>::New \
806 '(' + gf1.name() + #op + dvs.name() + ')', \
807 gf1.dimensions() op dvs.dimensions() \
810 Foam::opFunc(tRes(), gf1, dvs); \
812 reuseTmpGeometricField<productType, Type, PatchField, GeoMesh> \
823 class Type, template<class> class PatchField, \
826 tmp<GeometricField<typename product<Form, Type>::type, PatchField, GeoMesh> > \
829 const tmp<GeometricField<Type, PatchField, GeoMesh> >& tgf1, \
830 const VectorSpace<Form,Cmpt,nCmpt>& vs \
833 return tgf1 op dimensioned<Form>(static_cast<const Form&>(vs)); \
838 <class Form, class Type, template<class> class PatchField, class GeoMesh> \
842 <typename product<Form, Type>::type, PatchField, GeoMesh>& gf, \
843 const dimensioned<Form>& dvs, \
844 const GeometricField<Type, PatchField, GeoMesh>& gf1 \
847 Foam::opFunc(gf.internalField(), dvs.value(), gf1.internalField()); \
848 Foam::opFunc(gf.boundaryField(), dvs.value(), gf1.boundaryField()); \
852 <class Form, class Type, template<class> class PatchField, class GeoMesh> \
853 tmp<GeometricField<typename product<Form, Type>::type, PatchField, GeoMesh> > \
856 const dimensioned<Form>& dvs, \
857 const GeometricField<Type, PatchField, GeoMesh>& gf1 \
860 typedef typename product<Form, Type>::type productType; \
861 tmp<GeometricField<productType, PatchField, GeoMesh> > tRes \
863 new GeometricField<productType, PatchField, GeoMesh> \
867 '(' + dvs.name() + #op + gf1.name() + ')', \
874 dvs.dimensions() op gf1.dimensions() \
878 Foam::opFunc(tRes(), dvs, gf1); \
888 class Type, template<class> class PatchField, \
891 tmp<GeometricField<typename product<Form, Type>::type, PatchField, GeoMesh> > \
894 const VectorSpace<Form,Cmpt,nCmpt>& vs, \
895 const GeometricField<Type, PatchField, GeoMesh>& gf1 \
898 return dimensioned<Form>(static_cast<const Form&>(vs)) op gf1; \
902 <class Form, class Type, template<class> class PatchField, class GeoMesh> \
903 tmp<GeometricField<typename product<Form, Type>::type, PatchField, GeoMesh> > \
906 const dimensioned<Form>& dvs, \
907 const tmp<GeometricField<Type, PatchField, GeoMesh> >& tgf1 \
910 typedef typename product<Form, Type>::type productType; \
912 const GeometricField<Type, PatchField, GeoMesh>& gf1 = tgf1(); \
914 tmp<GeometricField<productType, PatchField, GeoMesh> > tRes = \
915 reuseTmpGeometricField<productType, Type, PatchField, GeoMesh>::New \
918 '(' + dvs.name() + #op + gf1.name() + ')', \
919 dvs.dimensions() op gf1.dimensions() \
922 Foam::opFunc(tRes(), dvs, gf1); \
924 reuseTmpGeometricField<productType, Type, PatchField, GeoMesh> \
935 class Type, template<class> class PatchField, \
938 tmp<GeometricField<typename product<Form, Type>::type, PatchField, GeoMesh> > \
941 const VectorSpace<Form,Cmpt,nCmpt>& vs, \
942 const tmp<GeometricField<Type, PatchField, GeoMesh> >& tgf1 \
945 return dimensioned<Form>(static_cast<const Form&>(vs)) op tgf1; \
956 #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)
void component(FieldField< Field, typename FieldField< Field, Type >::cmptType > &sf, const FieldField< Field, Type > &f, const direction d)
dimensioned< Type > cmptMultiply(const dimensioned< Type > &, const dimensioned< Type > &)
A class for managing temporary objects.
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)
GeometricBoundaryField & boundaryField()
Return reference to GeometricBoundaryField.
Type gSum(const FieldField< Field, Type > &f)
#define BINARY_FUNCTION(ReturnType, Type1, Type2, Func)
dimensioned< scalar > mag(const dimensioned< Type > &)
Field< Type >::cmptType cmptType
#define UNARY_REDUCTION_FUNCTION_WITH_BOUNDARY(returnType, func, gFunc)
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)
#define UNARY_REDUCTION_FUNCTION(returnType, func, gFunc)
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
InternalField & internalField()
Return internal field.
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)
Generic mesh wrapper used by volMesh, surfaceMesh, pointMesh etc.
scalar gSumMag(const FieldField< Field, Type > &f)
#define BINARY_TYPE_FUNCTION(ReturnType, Type1, Type2, Func)
#define PRODUCT_OPERATOR(product, op, opFunc)
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)
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.
Generic GeometricField class.
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.
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)