namedUnitConversion Class Reference

... More...

Inheritance diagram for namedUnitConversion:
Collaboration diagram for namedUnitConversion:

Public Member Functions

 ClassName ("namedUnitConversion")
 Run time type information. More...
 
 namedUnitConversion (const string &)
 Construct from name. More...
 
 namedUnitConversion (const namedUnitConversion &)=default
 Copy constructor. More...
 
 namedUnitConversion (namedUnitConversion &&)=default
 Move constructor. More...
 
void read (const word &keyword, const dictionary &)
 Update. More...
 
bool readIfPresent (const word &keyword, const dictionary &)
 Update if found in the dictionary. More...
 
- Public Member Functions inherited from unitConversion
 ClassName ("unitConversion")
 Run time type information. More...
 
 unitConversion (const dimensionSet &, const scalar fraction, const scalar angle, const scalar multiplier)
 Construct from components. More...
 
 unitConversion (const dimensionSet &)
 Construct from a dimension set. No dimensionless units. Unity. More...
 
 unitConversion (const unitConversion &)=default
 Copy constructor. More...
 
 unitConversion (unitConversion &&)=default
 Move constructor. More...
 
 unitConversion (Istream &is)
 Construct from stream. More...
 
const dimensionSetdimensions () const
 Access the dimensions. More...
 
template<class T >
T toStandard (const T &) const
 Convert a value to standard units. More...
 
template<class T >
List< TtoStandard (const List< T > &) const
 Convert a list of values to standard units. More...
 
template<class T >
tmp< Field< T > > toStandard (const Field< T > &) const
 Convert a field of values to standard units. More...
 
template<class T >
tmp< Field< T > > toStandard (const tmp< Field< T >> &) const
 Convert a tmp field of values to standard units. More...
 
template<class T >
void makeStandard (T &) const
 Convert a value to standard units. More...
 
template<class T >
void makeStandard (List< T > &) const
 Convert a list of values to standard units. More...
 
template<class T >
T toUser (const T &) const
 Convert a value to user units. More...
 
template<class T >
List< TtoUser (const List< T > &) const
 Convert a list of values to user units. More...
 
template<class T >
tmp< Field< T > > toUser (const Field< T > &) const
 Convert a field of values to user units. More...
 
template<class T >
tmp< Field< T > > toUser (const tmp< Field< T >> &) const
 Convert a tmp field of values to user units. More...
 
bool any () const
 Return whether this is the "any" unit. I.e., the case where. More...
 
bool none () const
 Return whether this is the "none" unit. I.e., the case where unit. More...
 
bool standard () const
 Return whether this unit is standard. I.e., is its multiplier one? More...
 
void reset (const unitConversion &)
 Reset the unit conversion. More...
 
void read (const word &keyword, const dictionary &)
 Update. More...
 
bool readIfPresent (const word &keyword, const dictionary &)
 Update if found in the dictionary. More...
 
bool readIfPresent (Istream &is)
 Update if found on the stream. More...
 
bool readIfPresent (const word &keyword, const dictionary &, Istream &is)
 Update if found on the dictionary stream. More...
 
InfoProxy< unitConversioninfo () const
 Return info proxy. More...
 
void operator= (const unitConversion &)=delete
 Disallow default bitwise assignment. More...
 
void operator= (const unitConversion &&)=delete
 Disallow default bitwise move assignment. More...
 
template<class T >
Foam::List< TtoStandard (const List< T > &l) const
 
template<class T >
Foam::tmp< Foam::Field< T > > toStandard (const Field< T > &f) const
 
template<class T >
Foam::tmp< Foam::Field< T > > toStandard (const tmp< Field< T >> &tf) const
 
template<class T >
Foam::List< TtoUser (const List< T > &l) const
 
template<class T >
Foam::tmp< Foam::Field< T > > toUser (const Field< T > &f) const
 
template<class T >
Foam::tmp< Foam::Field< T > > toUser (const tmp< Field< T >> &tf) const
 

Friends

Istreamoperator>> (Istream &, namedUnitConversion &)
 Read from stream. More...
 
Ostreamoperator<< (Ostream &, const namedUnitConversion &)
 Write to stream. More...
 

Additional Inherited Members

- Public Types inherited from unitConversion
enum  { nDimlessUnits = 2 }
 Define an enumeration for the number of dimensionless units. More...
 
enum  dimlessUnitType { FRACTION , ANGLE }
 Define an enumeration for the names of the dimensionless unit. More...
 
- Static Public Attributes inherited from unitConversion
static const NamedEnum< dimlessUnitType, 2 > dimlessUnitTypeNames_
 Names of the dimensionless units. More...
 
static const scalar smallExponent = rootSmall
 A small exponent with which to perform inexact comparisons. More...
 

Detailed Description

...

Source files

Definition at line 58 of file namedUnitConversion.H.

Constructor & Destructor Documentation

◆ namedUnitConversion() [1/3]

namedUnitConversion ( const string name)

Construct from name.

Definition at line 39 of file namedUnitConversion.C.

◆ namedUnitConversion() [2/3]

Copy constructor.

◆ namedUnitConversion() [3/3]

Move constructor.

Member Function Documentation

◆ ClassName()

ClassName ( "namedUnitConversion"  )

Run time type information.

◆ read()

void read ( const word keyword,
const dictionary dict 
)

Update.

Definition at line 57 of file namedUnitConversionIO.C.

References dict, and unitConversion::read().

Here is the call graph for this function:

◆ readIfPresent()

bool readIfPresent ( const word keyword,
const dictionary dict 
)

Update if found in the dictionary.

Definition at line 69 of file namedUnitConversionIO.C.

References dict, and unitConversion::readIfPresent().

Here is the call graph for this function:

Friends And Related Function Documentation

◆ operator>>

Istream& operator>> ( Istream ,
namedUnitConversion  
)
friend

Read from stream.

◆ operator<<

Ostream& operator<< ( Ostream ,
const namedUnitConversion  
)
friend

Write to stream.


The documentation for this class was generated from the following files: