Go to the documentation of this file.
57 <<
"Different dimensions for '" << what
58 <<
"'\n dimensions : " << a <<
" != " <<
b <<
nl
82 const scalar temperature,
85 const scalar luminousIntensity
90 exponents_[MASS] = mass;
91 exponents_[LENGTH] = length;
92 exponents_[TIME] = time;
93 exponents_[TEMPERATURE] = temperature;
94 exponents_[MOLES] = moles;
95 exponents_[CURRENT] = current;
96 exponents_[LUMINOUS_INTENSITY] = luminousIntensity;
108 exponents_(ds.exponents_)
116 for (
const scalar& val : exponents_)
119 if ((val > smallExponent) || (val < -smallExponent))
149 exponents_ = ds.exponents_;
157 return exponents_[
type];
163 return exponents_[
type];
169 return exponents_[
type];
175 return exponents_[
type];
181 for (
int d=0; d<nDimensions; ++d)
185 mag(exponents_[d] - ds.exponents_[d])
331 <<
"Exponent of pow is not dimensionless" <<
endl
353 <<
"Argument or exponent of pow not dimensionless" <<
endl
399 return pow(ds, 0.25);
411 return pow(ds, 1.0/3.0);
489 <<
"Argument of trancendental function not dimensionless" <<
nl
585 for (scalar& val : result.
values())
605 for (scalar& val : result.
values())
int debug
Static debugging option.
dimensionSet trans(const dimensionSet &ds)
Check the argument is dimensionless (for transcendental functions)
const dimensionSet dimless(0, 0, 0, 0, 0, 0, 0)
Dimensionless.
bool operator+=(const dimensionSet &) const
iterator begin()
Return an iterator to begin traversing the FixedList.
dimensioned< Type > cmptMultiply(const dimensioned< Type > &, const dimensioned< Type > &)
bool operator/=(const dimensionSet &)
dimensionSet pow2(const dimensionSet &ds)
static constexpr const zero Zero
Global zero (0)
static const scalar smallExponent
Tolerance for 'small' exponents, for near-zero rounding.
dimensionedScalar posPart(const dimensionedScalar &ds)
dimensionedScalar atan2(const dimensionedScalar &x, const dimensionedScalar &y)
tmp< faMatrix< Type > > operator-(const faMatrix< Type > &)
dimensionedScalar neg0(const dimensionedScalar &ds)
bool operator*=(const dimensionSet &)
Ostream & endl(Ostream &os)
Add newline and flush stream.
const Type & value() const
Return const reference to value.
dimensionedScalar pos0(const dimensionedScalar &ds)
Dimension set for the base types.
dimensionedScalar sign(const dimensionedScalar &ds)
dimensionSet transform(const dimensionSet &ds)
Return the argument; transformations do not change the dimensions.
label min(const labelHashSet &set, label minValue=labelMax)
Find the min value in labelHashSet, optionally limited by second argument.
dimensionSet()
Construct null (dimensionless).
dimensioned< typename typeOfMag< Type >::type > magSqr(const dimensioned< Type > &dt)
dimensionedScalar pow025(const dimensionedScalar &ds)
dimensionedScalar hypot(const dimensionedScalar &x, const dimensionedScalar &y)
dimensionType
Enumeration for the dimension exponents.
dimensionedScalar pow4(const dimensionedScalar &ds)
bool dimensionless() const
Return true if it is dimensionless.
dimensionedScalar pow6(const dimensionedScalar &ds)
const dimensionedScalar b
Wien displacement law constant: default SI units: [m.K].
tmp< faMatrix< Type > > operator==(const faMatrix< Type > &, const faMatrix< Type > &)
dimensionedScalar pow3(const dimensionedScalar &ds)
dimensionedSphericalTensor inv(const dimensionedSphericalTensor &dt)
bool operator==(const dimensionSet &) const
dimensionedScalar pow(const dimensionedScalar &ds, const dimensionedScalar &expt)
void clear()
Reset exponents to be dimensionless.
label max(const labelHashSet &set, label maxValue=labelMin)
Find the max value in labelHashSet, optionally limited by second argument.
bool operator!=(const dimensionSet &) const
bool operator-=(const dimensionSet &) const
dimensionedScalar pow5(const dimensionedScalar &ds)
errorManip< error > abort(error &err)
dimensioned< Type > cmptDivide(const dimensioned< Type > &, const dimensioned< Type > &)
bitSet operator~(const bitSet &bitset)
Bitset complement, returns a copy of the bitset with all its bits flipped.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
const FixedList< scalar, 7 > & values() const
Return const access to the exponents as a list.
dimensionedSymmTensor sqr(const dimensionedVector &dv)
dimensionedScalar negPart(const dimensionedScalar &ds)
dimensionSet clip(const dimensionSet &ds1, const dimensionSet &ds2)
dimensionedScalar sqrt(const dimensionedScalar &ds)
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
fileName::Type type(const fileName &name, const bool followLink=true)
Return the file type: DIRECTORY or FILE, normally following symbolic links.
scalar operator[](const dimensionType) const
dimensionSet invTransform(const dimensionSet &ds)
Return the argument; transformations do not change the dimensions.
bool operator=(const dimensionSet &) const
const dimensionSet & dimensions() const
Return const reference to dimensions.
dimensionedScalar cbrt(const dimensionedScalar &ds)
defineTypeNameAndDebug(combustionModel, 0)
dimensionedScalar neg(const dimensionedScalar &ds)
static bool checkDims(const char *what, const dimensionSet &a, const dimensionSet &b)
void reset(const dimensionSet &ds)
Copy assign the exponents from the dimensionSet.
dimensionedScalar pos(const dimensionedScalar &ds)