46 const scalar temperature,
49 const scalar luminousIntensity
52 exponents_[MASS] = mass;
53 exponents_[LENGTH] = length;
54 exponents_[TIME] = time;
55 exponents_[TEMPERATURE] = temperature;
56 exponents_[MOLES] = moles;
57 exponents_[CURRENT] = current;
58 exponents_[LUMINOUS_INTENSITY] = luminousIntensity;
67 const scalar temperature,
71 exponents_[MASS] = mass;
72 exponents_[LENGTH] = length;
73 exponents_[TIME] = time;
74 exponents_[TEMPERATURE] = temperature;
75 exponents_[MOLES] = moles;
76 exponents_[CURRENT] = 0;
77 exponents_[LUMINOUS_INTENSITY] = 0;
91 for (
int Dimension=0; Dimension<nDimensions; ++Dimension)
96 exponents_[Dimension] > smallExponent
97 || exponents_[Dimension] < -smallExponent
110 for (
int Dimension=0; Dimension<nDimensions; ++Dimension)
112 exponents_[Dimension] = ds.exponents_[Dimension];
121 return exponents_[
type];
127 return exponents_[
type];
133 return exponents_[
type];
139 return exponents_[
type];
145 for (
int Dimension=0; Dimension < nDimensions; ++Dimension)
149 mag(exponents_[Dimension] - ds.exponents_[Dimension])
169 if (dimensionSet::debug && *
this != ds)
172 <<
"Different dimensions for =" <<
endl 173 <<
" dimensions : " << *
this <<
" = " << ds <<
endl 183 if (dimensionSet::debug && *
this != ds)
186 <<
"Different dimensions for +=" <<
endl 187 <<
" dimensions : " << *
this <<
" = " << ds <<
endl 197 if (dimensionSet::debug && *
this != ds)
200 <<
"Different dimensions for -=" <<
endl 201 <<
" dimensions : " << *
this <<
" = " << ds <<
endl 229 if (dimensionSet::debug && ds1 != ds2)
232 <<
"Arguments of max have different dimensions" <<
endl 233 <<
" dimensions : " << ds1 <<
" and " << ds2 <<
endl 243 if (dimensionSet::debug && ds1 != ds2)
246 <<
"Arguments of min have different dimensions" <<
endl 247 <<
" dimensions : " << ds1 <<
" and " << ds2 <<
endl 301 <<
"Exponent of pow is not dimensionless" 334 <<
"Argument or exponent of pow not dimensionless" <<
endl 386 return pow(ds, 1.0/3.0);
455 <<
"Argument of trancendental function not dimensionless" 465 if (dimensionSet::debug && ds1 != ds2)
468 <<
"Arguments of atan2 have different dimensions" <<
endl 469 <<
" dimensions : " << ds1 <<
" and " << ds2 <<
endl 499 if (dimensionSet::debug && ds1 != ds2)
502 <<
"LHS and RHS of + have different dimensions" <<
endl 503 <<
" dimensions : " << ds1 <<
" + " << ds2 <<
endl 519 if (dimensionSet::debug && ds1 != ds2)
522 <<
"LHS and RHS of - have different dimensions" <<
endl 523 <<
" dimensions : " << ds1 <<
" - " << ds2 <<
endl 527 return dimDifference;
541 dimProduct.exponents_[Dimension] += ds2.exponents_[Dimension];
558 dimQuotient.exponents_[Dimension] -= ds2.exponents_[Dimension];
dimensionedScalar sign(const dimensionedScalar &ds)
dimensionSet trans(const dimensionSet &)
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
bool operator/=(const dimensionSet &)
dimensioned< Type > max(const dimensioned< Type > &, const dimensioned< Type > &)
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
dimensionedSymmTensor sqr(const dimensionedVector &dv)
dimensionedSphericalTensor inv(const dimensionedSphericalTensor &dt)
bool operator-=(const dimensionSet &) const
dimensionedScalar sqrt(const dimensionedScalar &ds)
Ostream & endl(Ostream &os)
Add newline and flush stream.
dimensionedScalar pow025(const dimensionedScalar &ds)
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.
dimensionedScalar posPart(const dimensionedScalar &ds)
dimensionedScalar neg(const dimensionedScalar &ds)
dimensionedScalar pow5(const dimensionedScalar &ds)
dimensioned< Type > cmptDivide(const dimensioned< Type > &, const dimensioned< Type > &)
bool operator*=(const dimensionSet &)
dimensionedScalar pos(const dimensionedScalar &ds)
Dimension set for the base types.
tmp< fvMatrix< Type > > operator==(const fvMatrix< Type > &, const fvMatrix< Type > &)
dimensionedScalar cbrt(const dimensionedScalar &ds)
dimensionedScalar neg0(const dimensionedScalar &ds)
const Type & value() const
Return const reference to value.
tmp< fvMatrix< Type > > operator-(const fvMatrix< Type > &)
bool operator+=(const dimensionSet &) const
errorManip< error > abort(error &err)
bool operator!=(const dimensionSet &) const
dimensioned< Type > cmptMultiply(const dimensioned< Type > &, const dimensioned< Type > &)
dimensioned< scalar > magSqr(const dimensioned< Type > &)
dimensionedScalar pos0(const dimensionedScalar &ds)
dimensionedScalar atan2(const dimensionedScalar &x, const dimensionedScalar &y)
defineTypeNameAndDebug(combustionModel, 0)
dimensioned< Type > min(const dimensioned< Type > &, const dimensioned< Type > &)
dimensionedScalar pow(const dimensionedScalar &ds, const dimensionedScalar &expt)
void reset(const dimensionSet &)
dimensionedScalar pow3(const dimensionedScalar &ds)
scalar operator[](const dimensionType) const
const dimensionSet dimless(0, 0, 0, 0, 0, 0, 0)
fileType type(const fileName &, const bool checkVariants=true, const bool followLink=true)
Return the file type: directory or file.
dimensionedScalar pow4(const dimensionedScalar &ds)
const dimensionSet & dimensions() const
Return const reference to dimensions.
dimensionedScalar pow6(const dimensionedScalar &ds)
dimensionType
Define an enumeration for the names of the dimension exponents.
dimensioned< scalar > mag(const dimensioned< Type > &)
bool operator==(const dimensionSet &) const
static const scalar smallExponent
bool dimensionless() const
Return true if it is dimensionless.
dimensionedScalar negPart(const dimensionedScalar &ds)
dimensionSet transform(const dimensionSet &)