30 inline bool Foam::specieExponent::hasIntegerExponent()
const 32 return integerExponent_ != noIntegerExponent_;
40 integerExponent_(noIntegerExponent_),
47 integerExponent_(integerExponent),
48 scalarExponent_(integerExponent)
55 scalarExponent_(scalarExponent)
57 const label integerExponent = floor(scalarExponent);
58 if (integerExponent == scalarExponent)
60 integerExponent_ = integerExponent;
67 inline Foam::specieExponent::operator scalar()
const 69 return scalarExponent_;
89 if (hasIntegerExponent())
91 return -integerExponent_;
95 return -scalarExponent_;
104 if (e.hasIntegerExponent())
106 if (e.integerExponent_ == 0)
112 scalar xx = e.integerExponent_ > 0 ?
x : 1/
x;
116 for (
label i = e.integerExponent_; i != 0; i /= 2)
131 return pow(x, e.scalarExponent_);
144 if (a.hasIntegerExponent() &&
b.hasIntegerExponent())
146 return a.integerExponent_ +
b.integerExponent_;
150 return a.scalarExponent_ +
b.scalarExponent_;
169 os << e.operator scalar();
specieExponent & operator=(const label integerExponent)
Assign to integer.
specieExponent operator-() const
Negate a specie exponent.
const dimensionedScalar b
Wien displacement law constant: default SI units: [m K].
friend scalar pow(const scalar x, const specieExponent &e)
Compute the power of a number to a specie exponent.
specieExponent()
Construct null.
static const label labelMax
An Ostream is an abstract base class for all output systems (streams, files, token lists...
dimensionedScalar pow(const dimensionedScalar &ds, const dimensionedScalar &expt)
Ostream & operator<<(Ostream &, const ensightPart &)
const doubleScalar e
Elementary charge.