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() +
')',
134 template<
class GeoMesh>
146 <<
"Base field is not dimensionless: " << dsf1.
dimensions()
153 <<
"Exponent field is not dimensionless: " << dsf2.
dimensions()
160 "pow(" + dsf1.
name() +
',' + dsf2.
name() +
')',
172 template<
class GeoMesh>
184 <<
"Base field is not dimensionless: " << dsf1.
dimensions()
191 <<
"Exponent field is not dimensionless: " << dsf2.
dimensions()
198 "pow(" + dsf1.
name() +
',' + dsf2.
name() +
')',
210 template<
class GeoMesh>
223 <<
"Base field is not dimensionless: " << dsf1.
dimensions()
230 <<
"Exponent field is not dimensionless: " << dsf2.
dimensions()
239 "pow(" + dsf1.
name() +
',' + dsf2.
name() +
')',
252 template<
class GeoMesh>
262 <<
"Exponent is not dimensionless: " << ds.
dimensions()
270 "pow(" + dsf.
name() +
',' + ds.
name() +
')',
282 template<
class GeoMesh>
292 <<
"Exponent is not dimensionless: " << ds.
dimensions()
301 "pow(" + dsf.
name() +
',' + ds.
name() +
')',
313 template<
class GeoMesh>
324 template<
class GeoMesh>
335 template<
class GeoMesh>
345 <<
"Base scalar is not dimensionless: " << ds.
dimensions()
352 <<
"Exponent field is not dimensionless: " << dsf.
dimensions()
360 "pow(" + ds.
name() +
',' + dsf.
name() +
')',
372 template<
class GeoMesh>
384 <<
"Base scalar is not dimensionless: " << ds.
dimensions()
391 <<
"Exponent field is not dimensionless: " << dsf.
dimensions()
398 "pow(" + ds.
name() +
',' + dsf.
name() +
')',
409 template<
class GeoMesh>
419 template<
class GeoMesh>
432 template<
class GeoMesh>
443 "atan2(" + dsf1.
name() +
',' + dsf2.
name() +
')',
455 template<
class GeoMesh>
467 "atan2(" + dsf1.
name() +
',' + dsf2.
name() +
')',
479 template<
class GeoMesh>
491 "atan2(" + dsf1.
name() +
',' + dsf2.
name() +
')',
502 template<
class GeoMesh>
517 "atan2(" + dsf1.
name() +
',' + dsf2.
name() +
')',
530 template<
class GeoMesh>
541 "atan2(" + dsf.
name() +
',' + ds.
name() +
')',
552 template<
class GeoMesh>
564 "atan2(" + dsf.
name() +
',' + ds.
name() +
')',
575 template<
class GeoMesh>
585 template<
class GeoMesh>
596 template<
class GeoMesh>
607 "atan2(" + ds.
name() +
',' + dsf.
name() +
')',
619 template<
class GeoMesh>
631 "atan2(" + ds.
name() +
',' + dsf.
name() +
')',
642 template<
class GeoMesh>
652 template<
class GeoMesh>
706 #define BesselFunc(func) \
708 template<class GeoMesh> \
709 tmp<DimensionedField<scalar, GeoMesh>> func \
712 const DimensionedField<scalar, GeoMesh>& dsf \
715 if (!dsf.dimensions().dimensionless()) \
717 FatalErrorInFunction \
718 << "dsf not dimensionless" \
719 << abort(FatalError); \
722 tmp<DimensionedField<scalar, GeoMesh>> tFunc \
724 DimensionedField<scalar, GeoMesh>::New \
726 #func "(" + name(n) + ',' + dsf.name() + ')', \
732 func(tFunc.ref().field(), n, dsf.field()); \
737 template<class GeoMesh> \
738 tmp<DimensionedField<scalar, GeoMesh>> func \
741 const tmp<DimensionedField<scalar, GeoMesh>>& tdsf \
744 const DimensionedField<scalar, GeoMesh>& dsf = tdsf(); \
746 if (!dsf.dimensions().dimensionless()) \
748 FatalErrorInFunction \
749 << " : dsf not dimensionless" \
750 << abort(FatalError); \
753 tmp<DimensionedField<scalar, GeoMesh>> tFunc \
758 #func "(" + name(n) + ',' + dsf.name() + ')', \
763 func(tFunc.ref().field(), n, dsf.field()); \
#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 Mesh & mesh() const
Return mesh.
const Field< Type > & field() const
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)
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)
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)
dimensionedScalar j0(const dimensionedScalar &ds)
dimensionedScalar pow025(const dimensionedScalar &ds)
dimensionedScalar asinh(const dimensionedScalar &ds)