30#define TEMPLATE template<template<class> class PatchField, class GeoMesh>
40template<
template<
class>
class PatchField,
class GeoMesh>
53template<
template<
class>
class PatchField,
class GeoMesh>
66 "stabilise(" + gsf.
name() +
',' + ds.
name() +
')',
83template<
template<
class>
class PatchField,
class GeoMesh>
97 "stabilise(" + gsf.
name() +
',' + ds.
name() +
')',
123template<
template<
class>
class PatchField,
class GeoMesh>
136template<
template<
class>
class PatchField,
class GeoMesh>
146 <<
"Base field is not dimensionless: " << gsf1.
dimensions()
153 <<
"Exponent field is not dimensionless: " << gsf2.
dimensions()
163 "pow(" + gsf1.
name() +
',' + gsf2.
name() +
')',
174 pow(tPow.
ref(), gsf1, gsf2);
180template<
template<
class>
class PatchField,
class GeoMesh>
192 <<
"Base field is not dimensionless: " << gsf1.
dimensions()
199 <<
"Exponent field is not dimensionless: " << gsf2.
dimensions()
208 "pow(" + gsf1.
name() +
',' + gsf2.
name() +
')',
213 pow(tPow.
ref(), gsf1, gsf2);
221template<
template<
class>
class PatchField,
class GeoMesh>
233 <<
"Base field is not dimensionless: " << gsf1.
dimensions()
240 <<
"Exponent field is not dimensionless: " << gsf2.
dimensions()
249 "pow(" + gsf1.
name() +
',' + gsf2.
name() +
')',
254 pow(tPow.
ref(), gsf1, gsf2);
261template<
template<
class>
class PatchField,
class GeoMesh>
274 <<
"Base field is not dimensionless: " << gsf1.
dimensions()
281 <<
"Exponent field is not dimensionless: " << gsf2.
dimensions()
288 <scalar, scalar, scalar, scalar, PatchField,
GeoMesh>
::New
292 "pow(" + gsf1.
name() +
',' + gsf2.
name() +
')',
297 pow(tPow.
ref(), gsf1, gsf2);
306template<
template<
class>
class PatchField,
class GeoMesh>
319template<
template<
class>
class PatchField,
class GeoMesh>
329 <<
"Exponent is not dimensionless: " << ds.
dimensions()
339 "pow(" + gsf.
name() +
',' + ds.
name() +
')',
355template<
template<
class>
class PatchField,
class GeoMesh>
365 <<
"Exponent is not dimensionless: " << ds.
dimensions()
376 "pow(" + gsf.
name() +
',' + ds.
name() +
')',
388template<
template<
class>
class PatchField,
class GeoMesh>
398template<
template<
class>
class PatchField,
class GeoMesh>
409template<
template<
class>
class PatchField,
class GeoMesh>
422template<
template<
class>
class PatchField,
class GeoMesh>
432 <<
"Base scalar is not dimensionless: " << ds.
dimensions()
439 <<
"Exponent field is not dimensionless: " << gsf.
dimensions()
449 "pow(" + ds.
name() +
',' + gsf.
name() +
')',
466template<
template<
class>
class PatchField,
class GeoMesh>
478 <<
"Base scalar is not dimensionless: " << ds.
dimensions()
485 <<
"Exponent field is not dimensionless: " << gsf.
dimensions()
494 "pow(" + ds.
name() +
',' + gsf.
name() +
')',
506template<
template<
class>
class PatchField,
class GeoMesh>
516template<
template<
class>
class PatchField,
class GeoMesh>
529template<
template<
class>
class PatchField,
class GeoMesh>
552template<
template<
class>
class PatchField,
class GeoMesh>
565 "atan2(" + gsf1.
name() +
',' + gsf2.
name() +
')',
582template<
template<
class>
class PatchField,
class GeoMesh>
596 "atan2(" + gsf1.
name() +
',' + gsf2.
name() +
')',
609template<
template<
class>
class PatchField,
class GeoMesh>
623 "atan2(" + gsf1.
name() +
',' + gsf2.
name() +
')',
635template<
template<
class>
class PatchField,
class GeoMesh>
648 <scalar, scalar, scalar, scalar, PatchField,
GeoMesh>
::New
652 "atan2(" + gsf1.
name() +
',' + gsf2.
name() +
')',
666template<
template<
class>
class PatchField,
class GeoMesh>
679template<
template<
class>
class PatchField,
class GeoMesh>
692 "atan2(" + gsf.
name() +
',' + ds.
name() +
')',
708template<
template<
class>
class PatchField,
class GeoMesh>
722 "atan2(" + gsf.
name() +
',' + ds.
name() +
')',
734template<
template<
class>
class PatchField,
class GeoMesh>
744template<
template<
class>
class PatchField,
class GeoMesh>
755template<
template<
class>
class PatchField,
class GeoMesh>
768template<
template<
class>
class PatchField,
class GeoMesh>
781 "atan2(" + ds.
name() +
',' + gsf.
name() +
')',
798template<
template<
class>
class PatchField,
class GeoMesh>
812 "atan2(" + ds.
name() +
',' + gsf.
name() +
')',
824template<
template<
class>
class PatchField,
class GeoMesh>
834template<
template<
class>
class PatchField,
class GeoMesh>
888#define BesselFunc(func) \
890template<template<class> class PatchField, class GeoMesh> \
893 GeometricField<scalar, PatchField, GeoMesh>& gsf, \
895 const GeometricField<scalar, PatchField, GeoMesh>& gsf1 \
898 func(gsf.primitiveFieldRef(), n, gsf1.primitiveField()); \
899 func(gsf.boundaryFieldRef(), n, gsf1.boundaryField()); \
902template<template<class> class PatchField, class GeoMesh> \
903tmp<GeometricField<scalar, PatchField, GeoMesh>> func \
906 const GeometricField<scalar, PatchField, GeoMesh>& gsf \
909 if (!gsf.dimensions().dimensionless()) \
911 FatalErrorInFunction \
912 << "gsf not dimensionless" \
913 << abort(FatalError); \
916 tmp<GeometricField<scalar, PatchField, GeoMesh>> tFunc \
918 new GeometricField<scalar, PatchField, GeoMesh> \
922 #func "(" + gsf.name() + ')', \
933 func(tFunc.ref(), n, gsf); \
938template<template<class> class PatchField, class GeoMesh> \
939tmp<GeometricField<scalar, PatchField, GeoMesh>> func \
942 const tmp<GeometricField<scalar, PatchField, GeoMesh>>& tgsf \
945 const GeometricField<scalar, PatchField, GeoMesh>& gsf = tgsf(); \
947 if (!gsf.dimensions().dimensionless()) \
949 FatalErrorInFunction \
950 << " : gsf not dimensionless" \
951 << abort(FatalError); \
954 tmp<GeometricField<scalar, PatchField, GeoMesh>> tFunc \
959 #func "(" + gsf.name() + ')', \
964 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)
#define UNARY_FUNCTION(ReturnType, Type1, Func, Dfunc)
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.
const Internal::FieldType & primitiveField() const
Return a const-reference to the internal field.
Internal::FieldType & primitiveFieldRef(const bool updateAccessTime=true)
Return a reference to the internal field.
Boundary & boundaryFieldRef(const bool updateAccessTime=true)
Return a reference to the boundary field.
const Boundary & boundaryField() const
Return const-reference to the boundary field.
Defines the attributes of an object for which implicit objectRegistry management is supported,...
const word & name() const noexcept
Return the object name.
const objectRegistry & db() const noexcept
Return the local objectRegistry.
const fileName & instance() const noexcept
Read access to instance path component.
bool dimensionless() const
Return true if it is dimensionless.
Generic dimensioned Type class.
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.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
gmvFile<< "tracers "<< particles.size()<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().x()<< " ";}gmvFile<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().y()<< " ";}gmvFile<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().z()<< " ";}gmvFile<< nl;forAll(lagrangianScalarNames, i){ word name=lagrangianScalarNames[i];IOField< scalar > s(IOobject(name, runTime.timeName(), cloud::prefix, mesh, IOobject::MUST_READ, IOobject::NO_WRITE))
dimensionedScalar pow6(const dimensionedScalar &ds)
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
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)
const dimensionSet dimless
Dimensionless.
dimensionedScalar tan(const dimensionedScalar &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)
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)
dimensionedScalar yn(const int n, const dimensionedScalar &ds)
dimensionedScalar log(const dimensionedScalar &ds)
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)
dimensionedScalar pow4(const dimensionedScalar &ds)
dimensionedScalar jn(const int n, const dimensionedScalar &ds)
void multiply(FieldField< Field, Type > &f, const FieldField< Field, Type > &f1, const FieldField< Field, scalar > &f2)
dimensionSet trans(const dimensionSet &ds)
Check the argument is dimensionless (for transcendental functions)
dimensionedScalar neg(const dimensionedScalar &ds)
dimensionedScalar atanh(const dimensionedScalar &ds)
dimensionedScalar stabilise(const dimensionedScalar &x, const dimensionedScalar &y)
tmp< DimensionedField< TypeR, GeoMesh > > New(const tmp< DimensionedField< TypeR, GeoMesh > > &tdf1, const word &name, const dimensionSet &dimensions)
Global function forwards to reuseTmpDimensionedField::New.
dimensionedScalar neg0(const dimensionedScalar &ds)
dimensionedScalar cbrt(const dimensionedScalar &ds)
dimensionedScalar atan(const dimensionedScalar &ds)
errorManipArg< error, int > exit(error &err, const int errNo=1)
void divide(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)
dimensionedScalar j0(const dimensionedScalar &ds)
dimensionedScalar pow025(const dimensionedScalar &ds)
dimensionedScalar asinh(const dimensionedScalar &ds)