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])
333 <<
"Exponent of pow is not dimensionless" <<
endl
355 <<
"Argument or exponent of pow not dimensionless" <<
endl
401 return pow(ds, 0.25);
413 return pow(ds, 1.0/3.0);
491 <<
"Argument of trancendental function not dimensionless" <<
nl
600 auto rhs = ds2.values().begin();
602 for (scalar& val : result.
values())
620 auto rhs = ds2.values().begin();
622 for (scalar& val : result.
values())
A 1D vector of objects of type <T> with a fixed length <N>.
Dimension set for the base types, which can be used to implement rigorous dimension checking for alge...
bool operator+=(const dimensionSet &) const
dimensionSet()
Default construct (dimensionless).
static bool checking() noexcept
True if dimension checking is enabled (the usual default)
bool operator/=(const dimensionSet &)
bool operator-=(const dimensionSet &) const
scalar operator[](const dimensionType) const
const FixedList< scalar, 7 > & values() const noexcept
Const access to the exponents as a list.
static const scalar smallExponent
Tolerance for 'small' exponents, for near-zero rounding.
bool dimensionless() const
Return true if it is dimensionless.
void clear()
Clear exponents - resets to be dimensionless.
dimensionType
Enumeration for the dimension exponents.
@ LUMINOUS_INTENSITY
Candela cd.
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.
void reset()
Reset to defaults.
friend bool operator!=(const refineCell &rc1, const refineCell &rc2)
friend bool operator==(const refineCell &rc1, const refineCell &rc2)
#define defineTypeNameAndDebug(Type, DebugSwitch)
Define the typeName and debug information.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
tmp< faMatrix< Type > > operator-(const faMatrix< Type > &)
Unary negation.
bitSet operator~(const bitSet &bitset)
Bitset complement, returns a copy of the bitset with all its bits flipped.
dimensionedScalar pow6(const dimensionedScalar &ds)
dimensionSet invTransform(const dimensionSet &ds)
Return the argument; transformations do not change the dimensions.
dimensionedScalar pos(const dimensionedScalar &ds)
dimensionedScalar pow5(const dimensionedScalar &ds)
label max(const labelHashSet &set, label maxValue=labelMin)
Find the max value in labelHashSet, optionally limited by second argument.
dimensionSet clip(const dimensionSet &ds1, const dimensionSet &ds2)
const dimensionSet dimless
Dimensionless.
dimensionSet transform(const dimensionSet &ds)
Return the argument; transformations do not change the dimensions.
dimensionedScalar pos0(const dimensionedScalar &ds)
dimensionedScalar sign(const dimensionedScalar &ds)
dimensionedSymmTensor sqr(const dimensionedVector &dv)
dimensionedScalar pow3(const dimensionedScalar &ds)
dimensioned< Type > cmptDivide(const dimensioned< Type > &, const dimensioned< Type > &)
fileName::Type type(const fileName &name, const bool followLink=true)
Return the file type: DIRECTORY or FILE, normally following symbolic links.
dimensionedScalar pow(const dimensionedScalar &ds, const dimensionedScalar &expt)
dimensionedScalar atan2(const dimensionedScalar &x, const dimensionedScalar &y)
Ostream & endl(Ostream &os)
Add newline and flush stream.
dimensionedScalar negPart(const dimensionedScalar &ds)
tmp< faMatrix< Type > > operator==(const faMatrix< Type > &, const faMatrix< Type > &)
dimensionedScalar sqrt(const dimensionedScalar &ds)
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
static bool checkDims(const char *what, const dimensionSet &a, const dimensionSet &b)
dimensionedScalar hypot(const dimensionedScalar &x, const dimensionedScalar &y)
label min(const labelHashSet &set, label minValue=labelMax)
Find the min value in labelHashSet, optionally limited by second argument.
dimensionedScalar pow4(const dimensionedScalar &ds)
errorManip< error > abort(error &err)
dimensionSet trans(const dimensionSet &ds)
Check the argument is dimensionless (for transcendental functions)
dimensionedScalar neg(const dimensionedScalar &ds)
dimensionedScalar stabilise(const dimensionedScalar &x, const dimensionedScalar &y)
static constexpr const zero Zero
Global zero (0)
dimensioned< Type > cmptMultiply(const dimensioned< Type > &, const dimensioned< Type > &)
dimensionedSphericalTensor inv(const dimensionedSphericalTensor &dt)
dimensionedScalar neg0(const dimensionedScalar &ds)
dimensionedScalar cbrt(const dimensionedScalar &ds)
dimensionSet pow2(const dimensionSet &ds)
dimensioned< typename typeOfMag< Type >::type > magSqr(const dimensioned< Type > &dt)
dimensionedScalar posPart(const dimensionedScalar &ds)
dimensionedScalar pow025(const dimensionedScalar &ds)
constexpr char nl
The newline '\n' character (0x0a)