64 const scalar temperature,
67 const scalar luminousIntensity
70 exponents_[
MASS] = mass;
71 exponents_[
LENGTH] = length;
72 exponents_[
TIME] = time;
74 exponents_[
MOLES] = moles;
85 const scalar temperature,
89 exponents_[MASS] = mass;
90 exponents_[LENGTH] = length;
91 exponents_[TIME] = time;
92 exponents_[TEMPERATURE] = temperature;
93 exponents_[MOLES] = moles;
94 exponents_[CURRENT] = 0;
95 exponents_[LUMINOUS_INTENSITY] = 0;
109 for (
int Dimension=0; Dimension<nDimensions; ++Dimension)
114 exponents_[Dimension] > smallExponent
115 || exponents_[Dimension] < -smallExponent
128 for (
int Dimension=0; Dimension<nDimensions; ++Dimension)
130 exponents_[Dimension] = ds.exponents_[Dimension];
139 return exponents_[
type];
145 return exponents_[
type];
151 return exponents_[
type];
157 return exponents_[
type];
163 for (
int Dimension=0; Dimension < nDimensions; ++Dimension)
167 mag(exponents_[Dimension] - ds.exponents_[Dimension])
187 if (dimensionSet::debug && *
this != ds)
190 <<
"Different dimensions for =" <<
endl
191 <<
" dimensions : " << info() <<
" = " << ds.
info() <<
endl
201 if (dimensionSet::debug && *
this != ds)
204 <<
"Different dimensions for +=" <<
endl
205 <<
" dimensions : " << info() <<
" = " << ds.
info() <<
endl
215 if (dimensionSet::debug && *
this != ds)
218 <<
"Different dimensions for -=" <<
endl
219 <<
" dimensions : " << info() <<
" = " << ds.
info() <<
endl
247 if (dimensionSet::debug && ds1 != ds2)
250 <<
"Arguments of max have different dimensions" <<
endl
251 <<
" dimensions : " << ds1.
info() <<
" and " << ds2.
info()
261 if (dimensionSet::debug && ds1 != ds2)
264 <<
"Arguments of min have different dimensions" <<
endl
265 <<
" dimensions : " << ds1.
info() <<
" and " << ds2.
info()
325 <<
"Exponent of pow is not dimensionless"
358 <<
"Argument or exponent of pow not dimensionless" <<
endl
410 return pow(ds, 1.0/3.0);
479 <<
"Argument of trancendental function not dimensionless"
489 if (dimensionSet::debug && ds1 != ds2)
492 <<
"Arguments of atan2 have different dimensions" <<
endl
493 <<
" dimensions : " << ds1.
info() <<
" and " << ds2.
info()
535 if (dimensionSet::debug && ds1 != ds2)
538 <<
"LHS and RHS of + have different dimensions" <<
endl
539 <<
" dimensions : " << ds1.
info() <<
" + " << ds2.info()
555 if (dimensionSet::debug && ds1 != ds2)
558 <<
"LHS and RHS of - have different dimensions" <<
endl
559 <<
" dimensions : " << ds1.
info() <<
" - " << ds2.info()
563 return dimDifference;
577 dimProduct.exponents_[Dimension] += ds2.exponents_[Dimension];
594 dimQuotient.exponents_[Dimension] -= ds2.exponents_[Dimension];
Initialise the NamedEnum HashTable from the static list of names.
Dimension set for the base types.
bool operator+=(const dimensionSet &) const
InfoProxy< dimensionSet > info() const
Return info proxy.
bool operator==(const dimensionSet &) const
bool operator!=(const dimensionSet &) const
dimensionSet(const scalar mass, const scalar length, const scalar time, const scalar temperature, const scalar moles, const scalar current, const scalar luminousIntensity)
Construct given individual dimension exponents for all.
static const scalar smallExponent
A small exponent with which to perform inexact comparisons.
bool operator/=(const dimensionSet &)
bool operator-=(const dimensionSet &) const
scalar operator[](const dimensionType) const
void reset(const dimensionSet &)
static const NamedEnum< dimensionType, 7 > dimensionTypeNames_
Names of the dimensions.
bool dimensionless() const
Return true if it is dimensionless.
dimensionType
Define an enumeration for the names of the dimension exponents.
bool operator*=(const dimensionSet &)
bool operator=(const dimensionSet &) const
const dimensionSet & dimensions() const
Return const reference to dimensions.
const Type & value() const
Return const reference to value.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
dimensionedScalar pos(const dimensionedScalar &ds)
void cmptMultiply(LagrangianPatchField< Type > &f, const LagrangianPatchField< Type > &f1, const LagrangianPatchField< Type > &f2)
dimensionedScalar pos0(const dimensionedScalar &ds)
dimensionedScalar sign(const dimensionedScalar &ds)
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
tmp< fvMatrix< Type > > operator==(const fvMatrix< Type > &, const fvMatrix< Type > &)
void cmptDivide(LagrangianPatchField< Type > &f, const LagrangianPatchField< Type > &f1, const LagrangianPatchField< Type > &f2)
Ostream & endl(Ostream &os)
Add newline and flush stream.
void pow025(LagrangianPatchField< scalar > &f, const LagrangianPatchField< scalar > &f1)
errorManip< error > abort(error &err)
const dimensionSet dimless
void pow4(LagrangianPatchField< scalar > &f, const LagrangianPatchField< scalar > &f1)
void pow6(LagrangianPatchField< scalar > &f, const LagrangianPatchField< scalar > &f1)
void mag(LagrangianPatchField< scalar > &f, const LagrangianPatchField< Type > &f1)
layerAndWeight min(const layerAndWeight &a, const layerAndWeight &b)
dimensionedScalar atan2(const dimensionedScalar &x, const dimensionedScalar &y)
dimensionedScalar negPart(const dimensionedScalar &ds)
void pow(LagrangianPatchField< typename powProduct< Type, r >::type > &f, const LagrangianPatchField< Type > &f1)
dimensionSet transform(const dimensionSet &)
void pow5(LagrangianPatchField< scalar > &f, const LagrangianPatchField< scalar > &f1)
dimensionSet normalised(const dimensionSet &)
defineTypeNameAndDebug(combustionModel, 0)
layerAndWeight max(const layerAndWeight &a, const layerAndWeight &b)
void pow3(LagrangianPatchField< scalar > &f, const LagrangianPatchField< scalar > &f1)
dimensionedScalar neg(const dimensionedScalar &ds)
void cbrt(LagrangianPatchField< scalar > &f, const LagrangianPatchField< scalar > &f1)
void sqr(LagrangianPatchField< typename outerProduct< Type, Type >::type > &f, const LagrangianPatchField< Type > &f1)
dimensionedScalar neg0(const dimensionedScalar &ds)
void inv(LagrangianPatchField< tensor > &f, const LagrangianPatchField< tensor > &f1)
void magSqr(LagrangianPatchField< scalar > &f, const LagrangianPatchField< Type > &f1)
dimensionSet perpendicular(const dimensionSet &)
void sqrt(LagrangianPatchField< scalar > &f, const LagrangianPatchField< scalar > &f1)
tmp< fvMatrix< Type > > operator-(const fvMatrix< Type > &)
dimensionSet trans(const dimensionSet &)
void cmptMag(LagrangianPatchField< Type > &f, const LagrangianPatchField< Type > &f1)
dimensionedScalar posPart(const dimensionedScalar &ds)
fileType type(const fileName &, const bool checkVariants=true, const bool followLink=true)
Return the file type: directory or file.