28 #define TEMPLATE template<class GeoMesh>
38 template<
class GeoMesh>
49 "stabilise(" + dsf.
name() +
',' + ds.
name() +
')',
61 template<
class GeoMesh>
73 "stabilise(" + dsf.
name() +
',' + ds.
name() +
')',
97 template<
class GeoMesh>
107 <<
"Base field is not dimensionless: " << dsf1.
dimensions()
114 <<
"Exponent field is not dimensionless: " << dsf2.
dimensions()
122 "pow(" + dsf1.
name() +
',' + dsf2.
name() +
')',
130 tPow.
ref().primitiveFieldRef(),
139 template<
class GeoMesh>
151 <<
"Base field is not dimensionless: " << dsf1.
dimensions()
158 <<
"Exponent field is not dimensionless: " << dsf2.
dimensions()
165 "pow(" + dsf1.
name() +
',' + dsf2.
name() +
')',
171 tPow.
ref().primitiveFieldRef(),
182 template<
class GeoMesh>
194 <<
"Base field is not dimensionless: " << dsf1.
dimensions()
201 <<
"Exponent field is not dimensionless: " << dsf2.
dimensions()
208 "pow(" + dsf1.
name() +
',' + dsf2.
name() +
')',
214 tPow.
ref().primitiveFieldRef(),
225 template<
class GeoMesh>
238 <<
"Base field is not dimensionless: " << dsf1.
dimensions()
245 <<
"Exponent field is not dimensionless: " << dsf2.
dimensions()
254 "pow(" + dsf1.
name() +
',' + dsf2.
name() +
')',
260 tPow.
ref().primitiveFieldRef(),
272 template<
class GeoMesh>
282 <<
"Exponent is not dimensionless: " << ds.
dimensions()
290 "pow(" + dsf.
name() +
',' + ds.
name() +
')',
302 template<
class GeoMesh>
312 <<
"Exponent is not dimensionless: " << ds.
dimensions()
321 "pow(" + dsf.
name() +
',' + ds.
name() +
')',
333 template<
class GeoMesh>
344 template<
class GeoMesh>
355 template<
class GeoMesh>
365 <<
"Base scalar is not dimensionless: " << ds.
dimensions()
372 <<
"Exponent field is not dimensionless: " << dsf.
dimensions()
380 "pow(" + ds.
name() +
',' + dsf.
name() +
')',
392 template<
class GeoMesh>
404 <<
"Base scalar is not dimensionless: " << ds.
dimensions()
411 <<
"Exponent field is not dimensionless: " << dsf.
dimensions()
418 "pow(" + ds.
name() +
',' + dsf.
name() +
')',
429 template<
class GeoMesh>
439 template<
class GeoMesh>
452 template<
class GeoMesh>
463 "atan2(" + dsf1.
name() +
',' + dsf2.
name() +
')',
471 tAtan2.
ref().primitiveFieldRef(),
480 template<
class GeoMesh>
492 "atan2(" + dsf1.
name() +
',' + dsf2.
name() +
')',
498 tAtan2.
ref().primitiveFieldRef(),
509 template<
class GeoMesh>
521 "atan2(" + dsf1.
name() +
',' + dsf2.
name() +
')',
527 tAtan2.
ref().primitiveFieldRef(),
537 template<
class GeoMesh>
552 "atan2(" + dsf1.
name() +
',' + dsf2.
name() +
')',
558 tAtan2.
ref().primitiveFieldRef(),
570 template<
class GeoMesh>
581 "atan2(" + dsf.
name() +
',' + ds.
name() +
')',
592 template<
class GeoMesh>
604 "atan2(" + dsf.
name() +
',' + ds.
name() +
')',
615 template<
class GeoMesh>
625 template<
class GeoMesh>
636 template<
class GeoMesh>
647 "atan2(" + ds.
name() +
',' + dsf.
name() +
')',
659 template<
class GeoMesh>
671 "atan2(" + ds.
name() +
',' + dsf.
name() +
')',
682 template<
class GeoMesh>
692 template<
class GeoMesh>
746 #define BesselFunc(func) \
748 template<class GeoMesh> \
749 tmp<DimensionedField<scalar, GeoMesh>> func \
752 const DimensionedField<scalar, GeoMesh>& dsf \
755 if (!dsf.dimensions().dimensionless()) \
757 FatalErrorInFunction \
758 << "dsf not dimensionless" \
759 << abort(FatalError); \
762 tmp<DimensionedField<scalar, GeoMesh>> tFunc \
764 DimensionedField<scalar, GeoMesh>::New \
766 #func "(" + name(n) + ',' + dsf.name() + ')', \
772 func(tFunc.ref().primitiveFieldRef(), n, dsf.primitiveField()); \
777 template<class GeoMesh> \
778 tmp<DimensionedField<scalar, GeoMesh>> func \
781 const tmp<DimensionedField<scalar, GeoMesh>>& tdsf \
784 const DimensionedField<scalar, GeoMesh>& dsf = tdsf(); \
786 if (!dsf.dimensions().dimensionless()) \
788 FatalErrorInFunction \
789 << " : dsf not dimensionless" \
790 << abort(FatalError); \
793 tmp<DimensionedField<scalar, GeoMesh>> tFunc \
798 #func "(" + name(n) + ',' + dsf.name() + ')', \
803 func(tFunc.ref().primitiveFieldRef(), n, dsf.primitiveField()); \
#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 DimensionedField.
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
const dimensionSet & dimensions() const
Return dimensions.
const Field< Type > & primitiveField() const
Return a const-reference to the primitive field.
const Mesh & mesh() const
Return mesh.
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.
static tmp< DimensionedField< TypeR, GeoMesh > > New(const tmp< DimensionedField< Type1, GeoMesh >> &tdf1, const tmp< DimensionedField< Type2, GeoMesh >> &tdf2, const word &name, const dimensionSet &dimensions)
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)