28 #define TEMPLATE template<template<class> class PatchField, class GeoMesh>
38 template<
template<
class>
class PatchField,
class GeoMesh>
51 template<
template<
class>
class PatchField,
class GeoMesh>
62 "stabilise(" + gsf.
name() +
',' + ds.
name() +
')',
74 template<
template<
class>
class PatchField,
class GeoMesh>
88 "stabilise(" + gsf.
name() +
',' + ds.
name() +
')',
114 template<
template<
class>
class PatchField,
class GeoMesh>
127 template<
template<
class>
class PatchField,
class GeoMesh>
137 <<
"Base field is not dimensionless: " << gsf1.
dimensions()
144 <<
"Exponent field is not dimensionless: " << gsf2.
dimensions()
152 "pow(" + gsf1.
name() +
',' + gsf2.
name() +
')',
158 pow(tPow.
ref(), gsf1, gsf2);
164 template<
template<
class>
class PatchField,
class GeoMesh>
176 <<
"Base field is not dimensionless: " << gsf1.
dimensions()
183 <<
"Exponent field is not dimensionless: " << gsf2.
dimensions()
192 "pow(" + gsf1.
name() +
',' + gsf2.
name() +
')',
197 pow(tPow.
ref(), gsf1, gsf2);
205 template<
template<
class>
class PatchField,
class GeoMesh>
217 <<
"Base field is not dimensionless: " << gsf1.
dimensions()
224 <<
"Exponent field is not dimensionless: " << gsf2.
dimensions()
233 "pow(" + gsf1.
name() +
',' + gsf2.
name() +
')',
238 pow(tPow.
ref(), gsf1, gsf2);
245 template<
template<
class>
class PatchField,
class GeoMesh>
258 <<
"Base field is not dimensionless: " << gsf1.
dimensions()
265 <<
"Exponent field is not dimensionless: " << gsf2.
dimensions()
272 <scalar, scalar, scalar, PatchField,
GeoMesh>::
New
276 "pow(" + gsf1.
name() +
',' + gsf2.
name() +
')',
281 pow(tPow.
ref(), gsf1, gsf2);
290 template<
template<
class>
class PatchField,
class GeoMesh>
303 template<
template<
class>
class PatchField,
class GeoMesh>
313 <<
"Exponent is not dimensionless: " << ds.
dimensions()
321 "pow(" + gsf.
name() +
',' + ds.
name() +
')',
332 template<
template<
class>
class PatchField,
class GeoMesh>
342 <<
"Exponent is not dimensionless: " << ds.
dimensions()
353 "pow(" + gsf.
name() +
',' + ds.
name() +
')',
365 template<
template<
class>
class PatchField,
class GeoMesh>
375 template<
template<
class>
class PatchField,
class GeoMesh>
386 template<
template<
class>
class PatchField,
class GeoMesh>
399 template<
template<
class>
class PatchField,
class GeoMesh>
409 <<
"Base scalar is not dimensionless: " << ds.
dimensions()
416 <<
"Exponent field is not dimensionless: " << gsf.
dimensions()
424 "pow(" + ds.
name() +
',' + gsf.
name() +
')',
436 template<
template<
class>
class PatchField,
class GeoMesh>
448 <<
"Base scalar is not dimensionless: " << ds.
dimensions()
455 <<
"Exponent field is not dimensionless: " << gsf.
dimensions()
464 "pow(" + ds.
name() +
',' + gsf.
name() +
')',
476 template<
template<
class>
class PatchField,
class GeoMesh>
486 template<
template<
class>
class PatchField,
class GeoMesh>
499 template<
template<
class>
class PatchField,
class GeoMesh>
522 template<
template<
class>
class PatchField,
class GeoMesh>
533 "atan2(" + gsf1.
name() +
',' + gsf2.
name() +
')',
545 template<
template<
class>
class PatchField,
class GeoMesh>
559 "atan2(" + gsf1.
name() +
',' + gsf2.
name() +
')',
572 template<
template<
class>
class PatchField,
class GeoMesh>
586 "atan2(" + gsf1.
name() +
',' + gsf2.
name() +
')',
598 template<
template<
class>
class PatchField,
class GeoMesh>
611 <scalar, scalar, scalar, PatchField,
GeoMesh>::
New
615 "atan2(" + gsf1.
name() +
',' + gsf2.
name() +
')',
629 template<
template<
class>
class PatchField,
class GeoMesh>
642 template<
template<
class>
class PatchField,
class GeoMesh>
653 "atan2(" + gsf.
name() +
',' + ds.
name() +
')',
664 template<
template<
class>
class PatchField,
class GeoMesh>
678 "atan2(" + gsf.
name() +
',' + ds.
name() +
')',
690 template<
template<
class>
class PatchField,
class GeoMesh>
700 template<
template<
class>
class PatchField,
class GeoMesh>
711 template<
template<
class>
class PatchField,
class GeoMesh>
724 template<
template<
class>
class PatchField,
class GeoMesh>
735 "atan2(" + ds.
name() +
',' + gsf.
name() +
')',
747 template<
template<
class>
class PatchField,
class GeoMesh>
761 "atan2(" + ds.
name() +
',' + gsf.
name() +
')',
773 template<
template<
class>
class PatchField,
class GeoMesh>
783 template<
template<
class>
class PatchField,
class GeoMesh>
837 #define BesselFunc(func) \
839 template<template<class> class PatchField, class GeoMesh> \
842 GeometricField<scalar, PatchField, GeoMesh>& gsf, \
844 const GeometricField<scalar, PatchField, GeoMesh>& gsf1 \
847 func(gsf.primitiveFieldRef(), n, gsf1.primitiveField()); \
848 func(gsf.boundaryFieldRef(), n, gsf1.boundaryField()); \
851 template<template<class> class PatchField, class GeoMesh> \
852 tmp<GeometricField<scalar, PatchField, GeoMesh>> func \
855 const GeometricField<scalar, PatchField, GeoMesh>& gsf \
858 if (!gsf.dimensions().dimensionless()) \
860 FatalErrorInFunction \
861 << "gsf not dimensionless" \
862 << abort(FatalError); \
865 tmp<GeometricField<scalar, PatchField, GeoMesh>> tFunc \
867 GeometricField<scalar, PatchField, GeoMesh>::New \
869 #func "(" + gsf.name() + ')', \
875 func(tFunc.ref(), n, gsf); \
880 template<template<class> class PatchField, class GeoMesh> \
881 tmp<GeometricField<scalar, PatchField, GeoMesh>> func \
884 const tmp<GeometricField<scalar, PatchField, GeoMesh>>& tgsf \
887 const GeometricField<scalar, PatchField, GeoMesh>& gsf = tgsf(); \
889 if (!gsf.dimensions().dimensionless()) \
891 FatalErrorInFunction \
892 << " : gsf not dimensionless" \
893 << abort(FatalError); \
896 tmp<GeometricField<scalar, PatchField, GeoMesh>> tFunc \
901 #func "(" + gsf.name() + ')', \
906 func(tFunc.ref(), n, gsf); \
#define BINARY_TYPE_OPERATOR(ReturnType, Type1, Type2, Op, OpName, OpFunc)
#define BINARY_OPERATOR(ReturnType, Type1, Type2, Op, OpName, OpFunc)
#define BINARY_TYPE_OPERATOR_SF(ReturnType, Type1, Type2, Op, OpName, OpFunc)
Scalar specific part of the implementation of GeometricField.
const dimensionSet & dimensions() const
Return dimensions.
const Mesh & mesh() const
Return mesh.
Generic mesh wrapper used by volMesh, surfaceMesh, pointMesh etc.
Generic GeometricField class.
Internal::FieldType & primitiveFieldRef()
Return a reference to the primitive field.
const Internal::FieldType & primitiveField() const
Return a const-reference to the primitive field.
const Boundary & boundaryField() const
Return const-reference to the boundary field.
Boundary & boundaryFieldRef()
Return a reference to the boundary field.
const word & name() const
Return name.
bool dimensionless() const
Return true if it is dimensionless.
const dimensionSet & dimensions() const
Return const reference to dimensions.
const Type & value() const
Return const reference to value.
const word & name() const
Return const reference to name.
A class for managing temporary objects.
T & ref() const
Return non-const reference or generate a fatal error.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
gmvFile<< "tracers "<< particles.size()<< nl;forAllConstIter(Cloud< passiveParticle >, particles, iter){ gmvFile<< iter().position().x()<< " ";}gmvFile<< nl;forAllConstIter(Cloud< passiveParticle >, particles, iter){ gmvFile<< iter().position().y()<< " ";}gmvFile<< nl;forAllConstIter(Cloud< passiveParticle >, particles, iter){ gmvFile<< iter().position().z()<< " ";}gmvFile<< nl;forAll(lagrangianScalarNames, i){ word name=lagrangianScalarNames[i];IOField< scalar > s(IOobject(name, runTime.name(), cloud::prefix, mesh, IOobject::MUST_READ, IOobject::NO_WRITE))
dimensionedScalar pow6(const dimensionedScalar &ds)
errorManipArg< error, int > exit(error &err, const int errNo=1)
dimensionedScalar pos(const dimensionedScalar &ds)
dimensionedScalar pow5(const dimensionedScalar &ds)
dimensionedScalar erfc(const dimensionedScalar &ds)
dimensionedScalar asin(const dimensionedScalar &ds)
dimensionedScalar exp(const dimensionedScalar &ds)
dimensionedScalar tan(const dimensionedScalar &ds)
tmp< DimensionedField< scalar, GeoMesh > > stabilise(const DimensionedField< scalar, GeoMesh > &dsf, const dimensioned< scalar > &ds)
dimensionedScalar pos0(const dimensionedScalar &ds)
dimensionedScalar sign(const dimensionedScalar &ds)
dimensionedScalar lgamma(const dimensionedScalar &ds)
dimensionedScalar j1(const dimensionedScalar &ds)
dimensionedScalar pow3(const dimensionedScalar &ds)
dimensionedScalar y0(const dimensionedScalar &ds)
dimensionedScalar cosh(const dimensionedScalar &ds)
void subtract(FieldField< Field1, typename typeOfSum< Type1, Type2 >::type > &f, const FieldField< Field1, Type1 > &f1, const FieldField< Field2, Type2 > &f2)
const dimensionSet dimless
dimensionedScalar sin(const dimensionedScalar &ds)
dimensionedScalar tanh(const dimensionedScalar &ds)
dimensionedScalar erf(const dimensionedScalar &ds)
dimensionedScalar sinh(const dimensionedScalar &ds)
dimensionedScalar log10(const dimensionedScalar &ds)
UNARY_FUNCTION(Type, Type, cmptMag, cmptMag)
dimensionedScalar yn(const int n, const dimensionedScalar &ds)
dimensionedScalar log(const dimensionedScalar &ds)
void divide(FieldField< Field, Type > &f, const FieldField< Field, Type > &f1, const FieldField< Field, scalar > &f2)
dimensionedScalar pow(const dimensionedScalar &ds, const dimensionedScalar &expt)
dimensionedScalar atan2(const dimensionedScalar &x, const dimensionedScalar &y)
dimensionedScalar y1(const dimensionedScalar &ds)
dimensionedScalar negPart(const dimensionedScalar &ds)
dimensionedScalar acosh(const dimensionedScalar &ds)
dimensionedScalar sqrt(const dimensionedScalar &ds)
void add(FieldField< Field1, typename typeOfSum< Type1, Type2 >::type > &f, const FieldField< Field1, Type1 > &f1, const FieldField< Field2, Type2 > &f2)
tmp< DimensionedField< TypeR, GeoMesh > > New(const tmp< DimensionedField< TypeR, GeoMesh >> &tdf1, const word &name, const dimensionSet &dimensions)
dimensionedScalar pow4(const dimensionedScalar &ds)
dimensionedScalar jn(const int n, const dimensionedScalar &ds)
dimensionedScalar neg(const dimensionedScalar &ds)
dimensionedScalar atanh(const dimensionedScalar &ds)
dimensionedScalar neg0(const dimensionedScalar &ds)
dimensionedScalar cbrt(const dimensionedScalar &ds)
dimensionedScalar atan(const dimensionedScalar &ds)
dimensionSet trans(const dimensionSet &)
void multiply(FieldField< Field, Type > &f, const FieldField< Field, Type > &f1, const FieldField< Field, scalar > &f2)
dimensionedScalar cos(const dimensionedScalar &ds)
dimensionedScalar posPart(const dimensionedScalar &ds)
dimensionedScalar acos(const dimensionedScalar &ds)
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
dimensionedScalar j0(const dimensionedScalar &ds)
dimensionedScalar pow025(const dimensionedScalar &ds)
dimensionedScalar asinh(const dimensionedScalar &ds)