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;
94 exponents_[
MOLES] = moles;
108 exponents_(ds.exponents_)
116 for (
const scalar val : exponents_)
119 if ((val > smallExponent) || (val < -smallExponent))
151 exponents_ = ds.exponents_;
159 return exponents_[
type];
165 return exponents_[
type];
171 return exponents_[
type];
177 return exponents_[
type];
183 for (
int d=0; d<nDimensions; ++d)
187 mag(exponents_[d] - ds.exponents_[d])
303 const dimensionSet& ds1,
304 const dimensionSet& ds2
313 const dimensionSet& ds1,
338 const dimensionSet& ds,
345 <<
"Exponent of pow is not dimensionless" <<
endl 349 return pow(ds,
p.value());
391 return pow(ds, 0.25);
403 return pow(ds, 1.0/3.0);
483 <<
"Argument of trancendental function not dimensionless" <<
nl 515 const dimensionSet& ds1,
516 const dimensionSet& ds2
556 const dimensionSet& ds1,
557 const dimensionSet& ds2
571 const dimensionSet& ds1,
572 const dimensionSet& ds2
586 const dimensionSet& ds1,
587 const dimensionSet& ds2
590 dimensionSet result(ds1);
592 auto rhs = ds2.values().begin();
594 for (scalar& val : result.values())
606 const dimensionSet& ds1,
607 const dimensionSet& ds2
610 dimensionSet result(ds1);
612 auto rhs = ds2.values().begin();
614 for (scalar& val : result.values())
626 const dimensionSet& ds1,
627 const dimensionSet& ds2
636 const dimensionSet& ds1,
637 const dimensionSet& ds2
646 const dimensionSet& ds1,
647 const dimensionSet& ds2
dimensionedScalar sign(const dimensionedScalar &ds)
bool operator/=(const dimensionSet &)
bitSet operator~(const bitSet &bitset)
Bitset complement, returns a copy of the bitset with all its bits flipped.
dimensionSet invTransform(const dimensionSet &ds)
Return the argument; transformations do not change the dimensions.
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
error FatalError
Error stream (stdout output on all processes), with additional 'FOAM FATAL ERROR' header text and sta...
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
label max(const labelHashSet &set, label maxValue=labelMin)
Find the max value in labelHashSet, optionally limited by second argument.
dimensionedSymmTensor sqr(const dimensionedVector &dv)
dimensionedSphericalTensor inv(const dimensionedSphericalTensor &dt)
constexpr char nl
The newline '\n' character (0x0a)
bool operator-=(const dimensionSet &) const
dimensionedScalar sqrt(const dimensionedScalar &ds)
Ostream & endl(Ostream &os)
Add newline and flush stream.
dimensionedScalar pow025(const dimensionedScalar &ds)
static const scalar smallExponent
Tolerance for 'small' exponents, for near-zero rounding.
bool operator=(const dimensionSet &) const
dimensionedScalar stabilise(const dimensionedScalar &x, const dimensionedScalar &y)
const dimensionSet dimless
Dimensionless.
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)
fileName::Type type(const fileName &name, const bool followLink=true)
Return the file type: DIRECTORY or FILE, normally following symbolic links.
Dimension set for the base types, which can be used to implement rigorous dimension checking for alge...
const FixedList< scalar, 7 > & values() const noexcept
Const access to the exponents as a list.
const dimensionedScalar b
Wien displacement law constant: default SI units: [m.K].
dimensionedScalar cbrt(const dimensionedScalar &ds)
dimensionedScalar neg0(const dimensionedScalar &ds)
dimensionSet()
Default construct (dimensionless).
bool operator+=(const dimensionSet &) const
label min(const labelHashSet &set, label minValue=labelMax)
Find the min value in labelHashSet, optionally limited by second argument.
dimensionSet pow2(const dimensionSet &ds)
errorManip< error > abort(error &err)
tmp< faMatrix< Type > > operator-(const faMatrix< Type > &)
Unary negation.
bool operator!=(const dimensionSet &) const
dimensioned< Type > cmptMultiply(const dimensioned< Type > &, const dimensioned< Type > &)
void reset(const dimensionSet &ds)
Copy assign the exponents from the dimensionSet.
dimensionedScalar pos0(const dimensionedScalar &ds)
dimensionedScalar atan2(const dimensionedScalar &x, const dimensionedScalar &y)
defineTypeNameAndDebug(combustionModel, 0)
dimensioned< Type > lerp(const dimensioned< Type > &a, const dimensioned< Type > &b, const scalar t)
dimensionSet trans(const dimensionSet &ds)
Check the argument is dimensionless (for transcendental functions)
dimensionedScalar pow(const dimensionedScalar &ds, const dimensionedScalar &expt)
void clear()
Clear exponents - resets to be dimensionless.
dimensionedScalar pow3(const dimensionedScalar &ds)
scalar operator[](const dimensionType) const
static bool checking() noexcept
True if dimension checking is enabled (the usual default)
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
dimensionedScalar pow4(const dimensionedScalar &ds)
static bool checkDims(const char *what, const dimensionSet &a, const dimensionSet &b)
dimensionedScalar pow6(const dimensionedScalar &ds)
dimensionType
Enumeration for the dimension exponents.
tmp< faMatrix< Type > > operator==(const faMatrix< Type > &, const faMatrix< Type > &)
dimensionSet transform(const dimensionSet &ds)
Return the argument; transformations do not change the dimensions.
bool operator==(const dimensionSet &) const
dimensionedScalar hypot(const dimensionedScalar &x, const dimensionedScalar &y)
bool dimensionless() const
Return true if it is dimensionless.
dimensioned< typename typeOfMag< Type >::type > magSqr(const dimensioned< Type > &dt)
dimensionedScalar negPart(const dimensionedScalar &ds)
dimensionSet clamp(const dimensionSet &a, const dimensionSet &range)
const dimensionSet & dimensions() const noexcept
Return dimensions.
static constexpr const zero Zero
Global zero (0)