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())
110 return pow(
x,
e.scalarExponent_);
123 if (a.hasIntegerExponent() &&
b.hasIntegerExponent())
125 return a.integerExponent_ +
b.integerExponent_;
129 return a.scalarExponent_ +
b.scalarExponent_;
148 os <<
e.operator scalar();
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Type for exponents of species in reaction. Can take either integer or scalar value,...
specieExponent()
Construct null.
specieExponent & operator=(const label integerExponent)
Assign to integer.
specieExponent operator-() const
Negate a specie exponent.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
scalar integerPow(const scalar x, const label e)
Compute the power of the number x to the integer e.
dimensionedScalar pow(const dimensionedScalar &ds, const dimensionedScalar &expt)
Ostream & operator<<(Ostream &os, const fvConstraints &constraints)
static const label labelMax