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< dimensionSet > | clone () 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 &) |
Istream & | read (Istream &is, scalar &multiplier, const dictionary &) |
Read using provided units. Used only in initial parsing. More... | |
Istream & | read (Istream &is, scalar &multiplier, const HashTable< dimensionedScalar > &) |
Read using provided units. More... | |
Istream & | read (Istream &is, scalar &multiplier) |
Read using system units. More... | |
Ostream & | write (Ostream &os, scalar &multiplier, const dimensionSets &) const |
Write using provided units. More... | |
Ostream & | write (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 |
Dimension set for the base types.
This type may be used to implement rigorous dimension checking for algebraic manipulation.
Definition at line 121 of file dimensionSet.H.
anonymous enum |
Enumerator | |
---|---|
nDimensions |
Definition at line 128 of file dimensionSet.H.
enum dimensionType |
Define an enumeration for the names of the dimension exponents.
Enumerator | |
---|---|
MASS | |
LENGTH | |
TIME | |
TEMPERATURE | |
MOLES | |
CURRENT | |
LUMINOUS_INTENSITY |
Definition at line 134 of file dimensionSet.H.
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().
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 | ) |
Construct from Istream.
Definition at line 33 of file dimensionSetIO.C.
References token::BEGIN_LIST, token::BEGIN_SQR, Foam::constant::universal::c, dimensioned< Type >::dimensions(), Foam::dimless, token::DIVIDE, token::END_LIST, token::END_SQR, Foam::exit(), Foam::exp(), Foam::FatalIOError, FatalIOErrorInFunction, token::good(), token::isPunctuation(), Foam::isspace(), token::isWord(), dimensionSet::mag, token::MULTIPLY, dimensionSet::nDimensions, Foam::pow(), dimensionSet::pow, token::pToken(), dimensionSet::read(), Foam::readScalar(), dimensionSet::reset(), dimensionSet::smallExponent, token::SPACE, token::SUBTRACT, dimensioned< Type >::value(), and token::wordToken().
ClassName | ( | "dimensionSet" | ) |
|
inline |
Construct and return a clone.
Definition at line 258 of file dimensionSet.H.
References dimensionSet::atan2, dimensionSet::cmptDivide, dimensionSet::cmptMag, dimensionSet::cmptMultiply, dimensionSet::dimensionless(), dimensionSet::dimensionSet(), dimensionSet::inv, dimensionSet::mag, dimensionSet::magSqr, dimensionSet::max, dimensionSet::min, dimensionSet::neg, dimensionSet::operator!=(), dimensionSet::operator*=(), dimensionSet::operator+=(), dimensionSet::operator-, dimensionSet::operator-=(), dimensionSet::operator/=(), dimensionSet::operator<<, dimensionSet::operator=(), dimensionSet::operator==(), dimensionSet::operator>>, dimensionSet::operator[](), dimensionSet::pos0, dimensionSet::pow, dimensionSet::pow025, dimensionSet::pow3, dimensionSet::pow4, dimensionSet::pow5, dimensionSet::pow6, dimensionSet::read(), dimensionSet::reset(), dimensionSet::sign, dimensionSet::sqr, dimensionSet::sqrt, dimensionSet::trans, dimensionSet::transform, dimensionSet::write(), and Foam::writeEntry().
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().
void reset | ( | const dimensionSet & | ds | ) |
Definition at line 108 of file dimensionSet.C.
Referenced by dimensionSet::clone(), dimensionSet::dimensionSet(), Foam::New(), and dimensionSet::read().
Foam::Istream & read | ( | Istream & | is, |
scalar & | multiplier, | ||
const dictionary & | readSet | ||
) |
Read using provided units. Used only in initial parsing.
Definition at line 498 of file dimensionSetIO.C.
References token::BEGIN_SQR, IOstream::check(), dimensionSet::CURRENT, dimensioned< Type >::dimensions(), Foam::dimless, token::END_SQR, Foam::endl(), Foam::exit(), Foam::exp(), Foam::FatalIOError, FatalIOErrorInFunction, IOstream::info(), token::isNumber(), token::isWord(), dimensionSet::LUMINOUS_INTENSITY, dimensionSet::MASS, dimensionSet::nDimensions, token::number(), Foam::pow(), dimensionSet::pow, dimensioned< Type >::read(), Foam::readScalar(), dimensionSet::reset(), s(), dimensionSet::smallExponent, dimensioned< Type >::value(), token::wordToken(), and dimensionSet::write().
Referenced by dimensionSet::clone(), dimensionSet::dimensionSet(), Foam::operator>>(), and dimensionSet::read().
Foam::Istream & read | ( | Istream & | is, |
scalar & | multiplier, | ||
const HashTable< dimensionedScalar > & | readSet | ||
) |
Read using provided units.
Definition at line 403 of file dimensionSetIO.C.
References token::BEGIN_SQR, IOstream::check(), dimensionSet::CURRENT, dimensioned< Type >::dimensions(), token::END_SQR, Foam::endl(), Foam::exit(), Foam::FatalIOError, FatalIOErrorInFunction, IOstream::info(), token::isNumber(), dimensionSet::LUMINOUS_INTENSITY, dimensionSet::MASS, dimensionSet::nDimensions, token::number(), Istream::putBack(), dimensionSet::read(), and dimensioned< Type >::value().
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().
Foam::Ostream & write | ( | Ostream & | os, |
scalar & | multiplier, | ||
const dimensionSets & | writeUnits | ||
) | const |
Write using provided units.
Definition at line 628 of file dimensionSetIO.C.
References IOstream::ASCII, token::BEGIN_SQR, IOstream::check(), dimensionSets::coefficients(), token::END_SQR, forAll, IOstream::format(), dimensionSet::mag, dimensioned< Type >::name(), dimensionSet::nDimensions, Foam::pow(), Ostream::precision(), dimensionSet::smallExponent, token::SPACE, dimensionSets::units(), dimensionSets::valid(), and dimensioned< Type >::value().
Referenced by dimensionSet::clone(), Foam::operator<<(), dimensionSet::read(), and dimensionSet::write().
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().
Foam::scalar operator[] | ( | const dimensionType | type | ) | const |
Definition at line 119 of file dimensionSet.C.
References Foam::type().
Referenced by dimensionSet::clone().
Foam::scalar & operator[] | ( | const dimensionType | type | ) |
Definition at line 125 of file dimensionSet.C.
References Foam::type().
Foam::scalar operator[] | ( | const label | type | ) | const |
Definition at line 131 of file dimensionSet.C.
References Foam::type().
Foam::scalar & operator[] | ( | const label | type | ) |
Definition at line 137 of file dimensionSet.C.
References Foam::type().
bool operator== | ( | const dimensionSet & | ds | ) | const |
Definition at line 143 of file dimensionSet.C.
References Foam::mag().
Referenced by dimensionSet::clone().
bool operator!= | ( | const dimensionSet & | ds | ) | const |
Definition at line 161 of file dimensionSet.C.
References Foam::operator==().
Referenced by dimensionSet::clone().
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().
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().
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().
bool operator*= | ( | const dimensionSet & | ds | ) |
Definition at line 209 of file dimensionSet.C.
Referenced by dimensionSet::clone().
bool operator/= | ( | const dimensionSet & | ds | ) |
Definition at line 217 of file dimensionSet.C.
Referenced by dimensionSet::clone().
|
friend |
Referenced by dimensionSet::clone().
|
friend |
Referenced by dimensionSet::clone().
|
friend |
Referenced by dimensionSet::clone().
|
friend |
Referenced by dimensionSet::clone().
|
friend |
Referenced by dimensionSet::clone().
|
friend |
Referenced by dimensionSet::clone(), dimensionSet::dimensionSet(), and dimensionSet::read().
|
friend |
|
friend |
|
friend |
Referenced by dimensionSet::clone().
|
friend |
Referenced by dimensionSet::clone().
|
friend |
Referenced by dimensionSet::clone().
|
friend |
Referenced by dimensionSet::clone().
|
friend |
Referenced by dimensionSet::clone().
|
friend |
Referenced by dimensionSet::clone().
|
friend |
Referenced by dimensionSet::clone().
|
friend |
Referenced by dimensionSet::clone().
|
friend |
Referenced by dimensionSet::clone(), dimensionSet::dimensionSet(), Foam::operator>>(), and dimensionSet::write().
|
friend |
Referenced by dimensionSet::clone().
|
friend |
Referenced by dimensionSet::clone().
|
friend |
Referenced by dimensionSet::clone().
|
friend |
Referenced by dimensionSet::clone().
|
friend |
Function to check the argument is dimensionless.
for transcendental functions
Referenced by dimensionSet::clone().
|
friend |
Referenced by dimensionSet::clone().
|
friend |
Return the argument; transformations do not change the dimensions.
Referenced by dimensionSet::clone(), coupledFvPatch::delta(), cyclicAMIFvPatch::delta(), jumpCyclicFvPatchField< Type >::patchNeighbourField(), jumpCyclicAMIFvPatchField< Type >::patchNeighbourField(), cyclicFvPatchField< Type >::patchNeighbourField(), and cyclicAMIFvPatchField< Type >::patchNeighbourField().
|
friend |
Referenced by dimensionSet::clone().
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
Referenced by dimensionSet::clone().
|
friend |
Referenced by dimensionSet::clone().
|
static |
Definition at line 148 of file dimensionSet.H.
Referenced by dimensionSet::dimensionSet(), Foam::operator>>(), dimensionSet::read(), and dimensionSet::write().