38 #ifndef unitConversion_H
39 #define unitConversion_H
51 template<
class Type>
class List;
52 template<
class Type>
class Field;
56 unitConversion
pow(
const unitConversion&,
const scalar);
57 const unitConversion&
operator+(
const unitConversion&,
const unitConversion&);
58 unitConversion
operator*(
const unitConversion&,
const unitConversion&);
59 unitConversion
operator/(
const unitConversion&,
const unitConversion&);
60 Istream&
operator>>(Istream&, unitConversion&);
61 Ostream&
operator<<(Ostream&,
const unitConversion&);
62 Ostream&
operator<<(Ostream&,
const InfoProxy<unitConversion>&);
122 const bool compareMultiplier
140 const scalar fraction,
142 const scalar multiplier
219 inline bool any()
const;
223 inline bool none()
const;
A helper class for outputting values to Ostream.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
An ordered pair of two objects of type <Type> with first() and second() elements.
A list of keywords followed by any number of values (e.g. words and numbers) or sub-dictionaries.
Dimension set for the base types.
A class for managing temporary objects.
Unit conversion structure. Contains the associated dimensions and the multiplier with which to conver...
friend Ostream & operator<<(Ostream &, const unitConversion &)
Write to stream.
friend unitConversion pow(const unitConversion &, const scalar)
Raise to a power.
ClassName("unitConversion")
Run time type information.
friend Istream & operator>>(Istream &, unitConversion &)
Read from stream.
bool readIfPresent(const word &keyword, const dictionary &)
Update if found in the dictionary.
void operator=(const unitConversion &)=delete
Disallow default bitwise assignment.
T toUser(const T &) const
Convert a value to user units.
bool none() const
Return whether this is the "none" unit. I.e., the case where unit.
static const NamedEnum< dimlessUnitType, 2 > dimlessUnitTypeNames_
Names of the dimensionless units.
const dimensionSet & dimensions() const
Access the dimensions.
static const scalar smallExponent
A small exponent with which to perform inexact comparisons.
void makeStandard(T &) const
Convert a value to standard units.
unitConversion(const dimensionSet &, const scalar fraction, const scalar angle, const scalar multiplier)
Construct from components.
InfoProxy< unitConversion > info() const
Return info proxy.
bool standard() const
Return whether this unit is standard. I.e., is its multiplier one?
void read(const word &keyword, const dictionary &)
Update.
void reset(const unitConversion &)
Reset the unit conversion.
T toStandard(const T &) const
Convert a value to standard units.
dimlessUnitType
Define an enumeration for the names of the dimensionless unit.
bool any() const
Return whether this is the "any" unit. I.e., the case where.
A class for handling words, derived from string.
void T(LagrangianPatchField< Type > &f, const LagrangianPatchField< Type > &f1)
void writeEntry(Ostream &os, const HashTable< T, Key, Hash > &ht)
void pow(LagrangianPatchField< typename powProduct< Type, r >::type > &f, const LagrangianPatchField< Type > &f1)
Istream & operator>>(Istream &, pistonPointEdgeData &)
tmp< fvMatrix< Type > > operator*(const volScalarField::Internal &, const fvMatrix< Type > &)
Ostream & operator<<(Ostream &os, const fvConstraints &constraints)
tmp< fvMatrix< Type > > operator+(const fvMatrix< Type > &, const fvMatrix< Type > &)
tmp< fvMatrix< Type > > operator/(const fvMatrix< Type > &, const volScalarField::Internal &)