Classes | Public Types | Public Member Functions | Static Public Attributes | Friends | List of all members
dimensionSet Class Reference

Dimension set for the base types. More...

Public Types

enum  { nDimensions = 7 }
 
enum  dimensionType {
  MASS, LENGTH, TIME, TEMPERATURE,
  MOLES, CURRENT, LUMINOUS_INTENSITY
}
 Define an enumeration for the names of the dimension exponents. More...
 

Public Member Functions

 ClassName ("dimensionSet")
 
 dimensionSet (const scalar mass, const scalar length, const scalar time, const scalar temperature, const scalar moles, const scalar current, const scalar luminousIntensity)
 Construct given individual dimension exponents for all. More...
 
 dimensionSet (const scalar mass, const scalar length, const scalar time, const scalar temperature, const scalar moles)
 Construct given individual dimension exponents for first. More...
 
 dimensionSet (const dimensionSet &ds)
 Copy constructor. More...
 
autoPtr< dimensionSetclone () const
 Construct and return a clone. More...
 
 dimensionSet (Istream &)
 Construct from Istream. More...
 
bool dimensionless () const
 Return true if it is dimensionless. More...
 
void reset (const dimensionSet &)
 
Istreamread (Istream &is, scalar &multiplier, const dictionary &)
 Read using provided units. Used only in initial parsing. More...
 
Istreamread (Istream &is, scalar &multiplier, const HashTable< dimensionedScalar > &)
 Read using provided units. More...
 
Istreamread (Istream &is, scalar &multiplier)
 Read using system units. More...
 
Ostreamwrite (Ostream &os, scalar &multiplier, const dimensionSets &) const
 Write using provided units. More...
 
Ostreamwrite (Ostream &os, scalar &multiplier) const
 Write using system units. More...
 
scalar operator[] (const dimensionType) const
 
scalar & operator[] (const dimensionType)
 
scalar operator[] (const label) const
 
scalar & operator[] (const label)
 
bool operator== (const dimensionSet &) const
 
bool operator!= (const dimensionSet &) const
 
bool operator= (const dimensionSet &) const
 
bool operator+= (const dimensionSet &) const
 
bool operator-= (const dimensionSet &) const
 
bool operator*= (const dimensionSet &)
 
bool operator/= (const dimensionSet &)
 

Static Public Attributes

static const scalar smallExponent = SMALL
 

Friends

dimensionSet max (const dimensionSet &, const dimensionSet &)
 
dimensionSet min (const dimensionSet &, const dimensionSet &)
 
dimensionSet cmptMultiply (const dimensionSet &, const dimensionSet &)
 
dimensionSet cmptDivide (const dimensionSet &, const dimensionSet &)
 
dimensionSet pow (const dimensionSet &, const scalar)
 
dimensionSet pow (const dimensionSet &, const dimensionedScalar &)
 
dimensionSet pow (const dimensionedScalar &, const dimensionSet &)
 
dimensionSet sqr (const dimensionSet &)
 
dimensionSet pow3 (const dimensionSet &)
 
dimensionSet pow4 (const dimensionSet &)
 
dimensionSet pow5 (const dimensionSet &)
 
dimensionSet pow6 (const dimensionSet &)
 
dimensionSet pow025 (const dimensionSet &)
 
dimensionSet sqrt (const dimensionSet &)
 
dimensionSet magSqr (const dimensionSet &)
 
dimensionSet mag (const dimensionSet &)
 
dimensionSet sign (const dimensionSet &)
 
dimensionSet pos (const dimensionSet &)
 
dimensionSet neg (const dimensionSet &)
 
dimensionSet inv (const dimensionSet &)
 
dimensionSet trans (const dimensionSet &)
 Function to check the argument is dimensionless. More...
 
dimensionSet atan2 (const dimensionSet &, const dimensionSet &)
 
dimensionSet transform (const dimensionSet &)
 Return the argument; transformations do not change the dimensions. More...
 
dimensionSet operator- (const dimensionSet &)
 
dimensionSet operator+ (const dimensionSet &, const dimensionSet &)
 
dimensionSet operator- (const dimensionSet &, const dimensionSet &)
 
dimensionSet operator* (const dimensionSet &, const dimensionSet &)
 
dimensionSet operator/ (const dimensionSet &, const dimensionSet &)
 
dimensionSet operator& (const dimensionSet &, const dimensionSet &)
 
dimensionSet operator^ (const dimensionSet &, const dimensionSet &)
 
dimensionSet operator&& (const dimensionSet &, const dimensionSet &)
 
Istreamoperator>> (Istream &, dimensionSet &)
 
Ostreamoperator<< (Ostream &, const dimensionSet &)
 

Detailed Description

Dimension set for the base types.

This type may be used to implement rigorous dimension checking for algebraic manipulation.

Source files

Definition at line 118 of file dimensionSet.H.

Member Enumeration Documentation

anonymous enum
Enumerator
nDimensions 

Definition at line 125 of file dimensionSet.H.

Define an enumeration for the names of the dimension exponents.

Enumerator
MASS 
LENGTH 
TIME 
TEMPERATURE 
MOLES 
CURRENT 
LUMINOUS_INTENSITY 

Definition at line 131 of file dimensionSet.H.

Constructor & Destructor Documentation

dimensionSet ( const scalar  mass,
const scalar  length,
const scalar  time,
const scalar  temperature,
const scalar  moles,
const scalar  current,
const scalar  luminousIntensity 
)

Construct given individual dimension exponents for all.

seven dimensions

Definition at line 42 of file dimensionSet.C.

Referenced by dimensionSet::clone().

Here is the caller graph for this function:

dimensionSet ( const scalar  mass,
const scalar  length,
const scalar  time,
const scalar  temperature,
const scalar  moles 
)

Construct given individual dimension exponents for first.

five dimensions

Definition at line 63 of file dimensionSet.C.

dimensionSet ( const dimensionSet ds)

Copy constructor.

Definition at line 81 of file dimensionSet.C.

dimensionSet ( Istream is)

Member Function Documentation

ClassName ( "dimensionSet"  )
autoPtr<dimensionSet> clone ( ) const
inline
bool dimensionless ( ) const

Return true if it is dimensionless.

Definition at line 89 of file dimensionSet.C.

Referenced by dimensionSet::clone(), Foam::pow(), and Foam::trans().

Here is the caller graph for this function:

void reset ( const dimensionSet ds)

Definition at line 108 of file dimensionSet.C.

Referenced by dimensionSet::clone(), dimensionSet::dimensionSet(), Foam::New(), and dimensionSet::read().

Here is the caller graph for this function:

Foam::Istream & read ( Istream is,
scalar &  multiplier,
const dictionary readSet 
)
Foam::Istream & read ( Istream is,
scalar &  multiplier,
const HashTable< dimensionedScalar > &  readSet 
)
Foam::Istream & read ( Istream is,
scalar &  multiplier 
)

Read using system units.

Definition at line 488 of file dimensionSetIO.C.

References dimensionSet::read(), and Foam::unitSet().

Here is the call graph for this function:

Foam::Ostream & write ( Ostream os,
scalar &  multiplier,
const dimensionSets writeUnits 
) const
Foam::Ostream & write ( Ostream os,
scalar &  multiplier 
) const

Write using system units.

Definition at line 702 of file dimensionSetIO.C.

References dimensionSet::write(), and Foam::writeUnitSet().

Here is the call graph for this function:

Foam::scalar operator[] ( const dimensionType  type) const

Definition at line 119 of file dimensionSet.C.

References Foam::type().

Referenced by dimensionSet::clone().

Here is the call graph for this function:

Here is the caller graph for this function:

Foam::scalar & operator[] ( const dimensionType  type)

Definition at line 125 of file dimensionSet.C.

References Foam::type().

Here is the call graph for this function:

Foam::scalar operator[] ( const label  type) const

Definition at line 131 of file dimensionSet.C.

References Foam::type().

Here is the call graph for this function:

Foam::scalar & operator[] ( const label  type)

Definition at line 137 of file dimensionSet.C.

References Foam::type().

Here is the call graph for this function:

bool operator== ( const dimensionSet ds) const

Definition at line 143 of file dimensionSet.C.

References Foam::mag().

Referenced by dimensionSet::clone().

Here is the call graph for this function:

Here is the caller graph for this function:

bool operator!= ( const dimensionSet ds) const

Definition at line 161 of file dimensionSet.C.

References Foam::operator==().

Referenced by dimensionSet::clone().

Here is the call graph for this function:

Here is the caller graph for this function:

bool operator= ( const dimensionSet ds) const

Definition at line 167 of file dimensionSet.C.

References Foam::abort(), Foam::endl(), Foam::FatalError, and FatalErrorInFunction.

Referenced by dimensionSet::clone().

Here is the call graph for this function:

Here is the caller graph for this function:

bool operator+= ( const dimensionSet ds) const

Definition at line 181 of file dimensionSet.C.

References Foam::abort(), Foam::endl(), Foam::FatalError, and FatalErrorInFunction.

Referenced by dimensionSet::clone().

Here is the call graph for this function:

Here is the caller graph for this function:

bool operator-= ( const dimensionSet ds) const

Definition at line 195 of file dimensionSet.C.

References Foam::abort(), Foam::endl(), Foam::FatalError, and FatalErrorInFunction.

Referenced by dimensionSet::clone().

Here is the call graph for this function:

Here is the caller graph for this function:

bool operator*= ( const dimensionSet ds)

Definition at line 209 of file dimensionSet.C.

Referenced by dimensionSet::clone().

Here is the caller graph for this function:

bool operator/= ( const dimensionSet ds)

Definition at line 217 of file dimensionSet.C.

Referenced by dimensionSet::clone().

Here is the caller graph for this function:

Friends And Related Function Documentation

dimensionSet max ( const dimensionSet ,
const dimensionSet  
)
friend

Referenced by dimensionSet::clone().

dimensionSet min ( const dimensionSet ,
const dimensionSet  
)
friend

Referenced by dimensionSet::clone().

dimensionSet cmptMultiply ( const dimensionSet ,
const dimensionSet  
)
friend

Referenced by dimensionSet::clone().

dimensionSet cmptDivide ( const dimensionSet ,
const dimensionSet  
)
friend

Referenced by dimensionSet::clone().

dimensionSet pow ( const dimensionSet ,
const scalar   
)
friend
dimensionSet pow ( const dimensionSet ,
const dimensionedScalar  
)
friend
dimensionSet pow ( const dimensionedScalar ,
const dimensionSet  
)
friend
dimensionSet sqr ( const dimensionSet )
friend

Referenced by dimensionSet::clone().

dimensionSet pow3 ( const dimensionSet )
friend

Referenced by dimensionSet::clone().

dimensionSet pow4 ( const dimensionSet )
friend

Referenced by dimensionSet::clone().

dimensionSet pow5 ( const dimensionSet )
friend

Referenced by dimensionSet::clone().

dimensionSet pow6 ( const dimensionSet )
friend

Referenced by dimensionSet::clone().

dimensionSet pow025 ( const dimensionSet )
friend

Referenced by dimensionSet::clone().

dimensionSet sqrt ( const dimensionSet )
friend

Referenced by dimensionSet::clone().

dimensionSet magSqr ( const dimensionSet )
friend

Referenced by dimensionSet::clone().

dimensionSet mag ( const dimensionSet )
friend
dimensionSet sign ( const dimensionSet )
friend

Referenced by dimensionSet::clone().

dimensionSet pos ( const dimensionSet )
friend

Referenced by dimensionSet::clone().

dimensionSet neg ( const dimensionSet )
friend

Referenced by dimensionSet::clone().

dimensionSet inv ( const dimensionSet )
friend

Referenced by dimensionSet::clone().

dimensionSet trans ( const dimensionSet )
friend

Function to check the argument is dimensionless.

for transcendental functions

Referenced by dimensionSet::clone().

dimensionSet atan2 ( const dimensionSet ,
const dimensionSet  
)
friend

Referenced by dimensionSet::clone().

dimensionSet transform ( const dimensionSet )
friend

Return the argument; transformations do not change the dimensions.

Referenced by dimensionSet::clone().

dimensionSet operator- ( const dimensionSet )
friend

Referenced by dimensionSet::clone().

dimensionSet operator+ ( const dimensionSet ,
const dimensionSet  
)
friend
dimensionSet operator- ( const dimensionSet ,
const dimensionSet  
)
friend
dimensionSet operator* ( const dimensionSet ,
const dimensionSet  
)
friend
dimensionSet operator/ ( const dimensionSet ,
const dimensionSet  
)
friend
dimensionSet operator& ( const dimensionSet ,
const dimensionSet  
)
friend
dimensionSet operator^ ( const dimensionSet ,
const dimensionSet  
)
friend
dimensionSet operator&& ( const dimensionSet ,
const dimensionSet  
)
friend
Istream& operator>> ( Istream ,
dimensionSet  
)
friend

Referenced by dimensionSet::clone().

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

Referenced by dimensionSet::clone().

Member Data Documentation

const scalar smallExponent = SMALL
static

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