67 const scalar temperature,
70 const scalar luminousIntensity
73 exponents_[
MASS] = mass;
74 exponents_[
LENGTH] = length;
75 exponents_[
TIME] = time;
77 exponents_[
MOLES] = moles;
88 const scalar temperature,
92 exponents_[MASS] = mass;
93 exponents_[LENGTH] = length;
94 exponents_[TIME] = time;
95 exponents_[TEMPERATURE] = temperature;
96 exponents_[MOLES] = moles;
97 exponents_[CURRENT] = 0;
98 exponents_[LUMINOUS_INTENSITY] = 0;
112 for (
int Dimension=0; Dimension<nDimensions; ++Dimension)
117 exponents_[Dimension] > smallExponent
118 || exponents_[Dimension] < -smallExponent
131 for (
int Dimension=0; Dimension<nDimensions; ++Dimension)
133 exponents_[Dimension] = ds.exponents_[Dimension];
142 return exponents_[
type];
148 return exponents_[
type];
154 return exponents_[
type];
160 return exponents_[
type];
166 for (
int Dimension=0; Dimension < nDimensions; ++Dimension)
170 mag(exponents_[Dimension] - ds.exponents_[Dimension])
190 if (dimensionSet::debug && *
this != ds)
193 <<
"Different dimensions for =" <<
endl
194 <<
" dimensions : " << info() <<
" = " << ds.
info() <<
endl
204 if (dimensionSet::debug && *
this != ds)
207 <<
"Different dimensions for +=" <<
endl
208 <<
" dimensions : " << info() <<
" = " << ds.
info() <<
endl
218 if (dimensionSet::debug && *
this != ds)
221 <<
"Different dimensions for -=" <<
endl
222 <<
" dimensions : " << info() <<
" = " << ds.
info() <<
endl
250 if (dimensionSet::debug && ds1 != ds2)
253 <<
"Arguments of max have different dimensions" <<
endl
254 <<
" dimensions : " << ds1.
info() <<
" and " << ds2.
info()
264 if (dimensionSet::debug && ds1 != ds2)
267 <<
"Arguments of min have different dimensions" <<
endl
268 <<
" dimensions : " << ds1.
info() <<
" and " << ds2.
info()
328 <<
"Exponent of pow is not dimensionless"
361 <<
"Argument or exponent of pow not dimensionless" <<
endl
413 return pow(ds, 1.0/3.0);
482 <<
"Argument of trancendental function not dimensionless"
492 if (dimensionSet::debug && ds1 != ds2)
495 <<
"Arguments of atan2 have different dimensions" <<
endl
496 <<
" dimensions : " << ds1.
info() <<
" and " << ds2.
info()
538 if (dimensionSet::debug && ds1 != ds2)
541 <<
"LHS and RHS of + have different dimensions" <<
endl
542 <<
" dimensions : " << ds1.
info() <<
" + " << ds2.info()
558 if (dimensionSet::debug && ds1 != ds2)
561 <<
"LHS and RHS of - have different dimensions" <<
endl
562 <<
" dimensions : " << ds1.
info() <<
" - " << ds2.info()
566 return dimDifference;
580 dimProduct.exponents_[Dimension] += ds2.exponents_[Dimension];
597 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 pow6(const dimensionedScalar &ds)
dimensionedScalar pos(const dimensionedScalar &ds)
dimensionedScalar pow5(const dimensionedScalar &ds)
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.
dimensionedSymmTensor sqr(const dimensionedVector &dv)
tmp< fvMatrix< Type > > operator==(const fvMatrix< Type > &, const fvMatrix< Type > &)
Ostream & endl(Ostream &os)
Add newline and flush stream.
dimensionedScalar pow3(const dimensionedScalar &ds)
errorManip< error > abort(error &err)
const dimensionSet dimless
layerAndWeight min(const layerAndWeight &a, const layerAndWeight &b)
dimensionedScalar pow(const dimensionedScalar &ds, const dimensionedScalar &expt)
dimensionedScalar atan2(const dimensionedScalar &x, const dimensionedScalar &y)
dimensionedScalar negPart(const dimensionedScalar &ds)
dimensionedScalar sqrt(const dimensionedScalar &ds)
dimensionSet transform(const dimensionSet &)
dimensionSet normalised(const dimensionSet &)
dimensioned< scalar > mag(const dimensioned< Type > &)
defineTypeNameAndDebug(combustionModel, 0)
dimensionedScalar pow4(const dimensionedScalar &ds)
layerAndWeight max(const layerAndWeight &a, const layerAndWeight &b)
dimensioned< Type > cmptMultiply(const dimensioned< Type > &, const dimensioned< Type > &)
dimensionedScalar neg(const dimensionedScalar &ds)
dimensionSet cmptMag(const dimensionSet &)
dimensioned< Type > cmptDivide(const dimensioned< Type > &, const dimensioned< Type > &)
dimensionedSphericalTensor inv(const dimensionedSphericalTensor &dt)
dimensionedScalar neg0(const dimensionedScalar &ds)
dimensionedScalar cbrt(const dimensionedScalar &ds)
dimensionSet perpendicular(const dimensionSet &)
tmp< fvMatrix< Type > > operator-(const fvMatrix< Type > &)
dimensionSet trans(const dimensionSet &)
dimensioned< scalar > magSqr(const dimensioned< Type > &)
dimensionedScalar posPart(const dimensionedScalar &ds)
fileType type(const fileName &, const bool checkVariants=true, const bool followLink=true)
Return the file type: directory or file.
dimensionedScalar pow025(const dimensionedScalar &ds)