56 unitSet
pow(
const unitSet&,
const scalar);
57 const unitSet&
operator+(
const unitSet&,
const unitSet&);
58 unitSet
operator*(
const unitSet&,
const unitSet&);
59 unitSet
operator/(
const unitSet&,
const unitSet&);
62 Ostream&
operator<<(Ostream&,
const InfoProxy<unitSet>&);
122 const bool compareMultiplier
154 const scalar multiplier
198 inline bool any()
const;
202 inline bool none()
const;
259 friend const unitSet&
operator+
319 template<
class Type,
class Convert>
372 template<
class Type,
class Units>
A helper class for outputting values to Ostream.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
A list of keywords followed by any number of values (e.g. words and numbers) or sub-dictionaries.
Dimension set for the base types.
dimensionType
Define an enumeration for the names of the dimension exponents.
A zero-sized class without any storage. Used, for example, in HashSet.
Unit conversion structure. Contains the associated dimensions and the multiplier with which to conver...
void operator=(const unitSet &)=delete
Disallow default bitwise assignment.
static unitSet newAny()
Return a new "any" unit set.
bool readIfPresent(const word &keyword, const dictionary &)
Update if found in the dictionary.
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.
InfoProxy< unitSet > info() const
Return info proxy.
const dimensionSet & dimensions() const
Access the dimensions.
void makeStandard(T &) const
Convert a value to standard units.
static unitSet newNone()
Return a new "none" unit set.
bool standard() const
Return whether this unit is standard. I.e., is its multiplier one?
static unitSet newUnitless()
Return a new "unitless" unit set.
void read(const word &keyword, const dictionary &)
Update.
unitSet(const dimensionSet &, const scalar fraction, const scalar angle, const scalar multiplier)
Construct from components.
scalar operator[](const dimensionSet::dimensionType type) const
Access the dimension exponents.
T toStandard(const T &) const
Convert a value to standard units.
static const scalar smallExponent
A small exponent with which to perform inexact comparisons.
static const NamedEnum< dimlessUnitType, 2 > & dimlessUnitTypeNames_
Names of the dimensionless units.
bool dimensionless() const
Return true if it is dimensionless.
ClassName("unitSet")
Run time type information.
dimlessUnitType
Define an enumeration for the names of the dimensionless unit.
friend unitSet pow(const unitSet &, const scalar)
Raise to a power.
void reset(const unitSet &)
Reset the unit conversion.
friend Ostream & operator<<(Ostream &, const unitSet &)
Write to stream.
bool any() const
Return whether this is the "any" unit. I.e., the case where.
friend Istream & operator>>(Istream &, unitSet &)
Read from stream.
void makeUser(T &) const
Convert a value to user units.
A class for handling words, derived from string.
Istream & operator>>(Istream &, pointEdgeDist &)
std::enable_if_t<!scaleable< Type >::value, Void > enableIfNotScaleable
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
std::enable_if_t< std::is_same< scalar, typename pTraits< Type >::cmptType >::value, Void > enableIfScalarCmptType
const typeUnitsType< label >::type & typeUnits< label >(const unitSet &)
Type readAndConvert(Istream &, const unitSet &)
Read a type which supports unit conversion.
tmp< DimensionedField< Type, GeoMesh, Field > > operator/(const DimensionedField< Type, GeoMesh, PrimitiveField1 > &df1, const DimensionedField< scalar, GeoMesh, PrimitiveField2 > &df2)
tmp< DimensionedField< typename typeOfSum< Type1, Type2 >::type, GeoMesh, Field > > operator+(const DimensionedField< Type1, GeoMesh, PrimitiveField1 > &df1, const DimensionedField< Type2, GeoMesh, PrimitiveField2 > &df2)
tmp< DimensionedField< Type, GeoMesh, Field > > operator*(const DimensionedField< Type, GeoMesh, PrimitiveField1 > &df1, const DimensionedField< scalar, GeoMesh, PrimitiveField2 > &df2)
enableIfScaleable< Type, Type > readAndMaybeConvert(Istream &)
Read a type which may or may not support unit conversion.
tmp< DimensionedField< typename powProduct< Type, r >::type, GeoMesh, Field > > pow(const DimensionedField< Type, GeoMesh, PrimitiveField > &df, typename powProduct< Type, r >::type)
dimensionSet readAndMaybeConvert< dimensionSet >(Istream &)
Read a dimension set.
Ostream & operator<<(Ostream &os, const fvConstraints &constraints)
std::enable_if_t< scaleable< Type >::value, Void > enableIfScaleable
unitSet readAndMaybeConvert< unitSet >(Istream &)
Read a unit set.
void T(GeometricField< Type, GeoMesh, PrimitiveField1 > &gf, const GeometricField< Type, GeoMesh, PrimitiveField2 > &gf1)
void writeEntry(Ostream &os, const word &key, const DimensionedFieldFunction< DimensionedFieldType > &f)
const typeUnitsType< Type >::type & typeUnits(const unitSet &)
void convert(UList< Type > &l, const Args &... args)
Apply a conversion to a UList by applying to each element individually.
fileType type(const fileName &, const bool checkVariants=true, const bool followLink=true)
Return the file type: directory or file.
Trait to identify types which are "scaleable"; i.e., that can be multiply-equals-d with a scalar....
Get the units type for a given type. This returns the unit set for.
Functor to convert to standard.
void operator()(Type &t, const unitSet &units) const
Functor to convert to user.
void operator()(Type &t, const unitSet &units) const