Dimension set for the base types. More...
Public Types | |
enum | { nDimensions = 7 } |
Define an enumeration for the number of dimensions. More... | |
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 & | readNoBegin (Istream &is) |
Read, assuming the '[' has already been read. More... | |
Istream & | read (Istream &is) |
Read. More... | |
Ostream & | write (Ostream &os) const |
Write. More... | |
InfoProxy< dimensionSet > | info () const |
Return info proxy. 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 NamedEnum< dimensionType, 7 > | dimensionTypeNames_ |
Names of the dimensions. More... | |
static const scalar | smallExponent = rootSmall |
A small exponent with which to perform inexact comparisons. More... | |
Dimension set for the base types.
This type may be used to implement rigorous dimension checking for algebraic manipulation.
Definition at line 124 of file dimensionSet.H.
anonymous enum |
Define an enumeration for the number of dimensions.
Enumerator | |
---|---|
nDimensions |
Definition at line 132 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 138 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 62 of file dimensionSet.C.
References dimensionSet::CURRENT, dimensionSet::LENGTH, dimensionSet::LUMINOUS_INTENSITY, dimensionSet::MASS, dimensionSet::MOLES, dimensionSet::TEMPERATURE, and dimensionSet::TIME.
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 83 of file dimensionSet.C.
dimensionSet | ( | const dimensionSet & | ds | ) |
Copy constructor.
Definition at line 102 of file dimensionSet.C.
dimensionSet | ( | Istream & | is | ) |
Construct from Istream.
Definition at line 56 of file dimensionSetIO.C.
ClassName | ( | "dimensionSet" | ) |
|
inline |
Construct and return a clone.
Definition at line 210 of file dimensionSet.H.
References dimensionSet::dimensionSet().
bool dimensionless | ( | ) | const |
Return true if it is dimensionless.
Definition at line 110 of file dimensionSet.C.
Referenced by Foam::pow(), and Foam::trans().
void reset | ( | const dimensionSet & | ds | ) |
Definition at line 129 of file dimensionSet.C.
Referenced by LehrMilliesMewes::addToBinaryBreakupRate(), reuseTmpTmpDimensionedField< TypeR, Type1, TypeR, GeoMesh >::New(), reuseTmpTmpDimensionedField< TypeR, TypeR, Type2, GeoMesh >::New(), reuseTmpTmpDimensionedField< TypeR, TypeR, TypeR, GeoMesh >::New(), Foam::New(), reuseTmpDimensionedField< TypeR, TypeR, GeoMesh >::New(), reuseTmpTmpGeometricField< TypeR, Type1, TypeR, PatchField, GeoMesh >::New(), reuseTmpTmpGeometricField< TypeR, TypeR, Type2, PatchField, GeoMesh >::New(), reuseTmpTmpGeometricField< TypeR, TypeR, TypeR, PatchField, GeoMesh >::New(), and reuseTmpGeometricField< TypeR, TypeR, PatchField, GeoMesh >::New().
Foam::Istream & readNoBegin | ( | Istream & | is | ) |
Read, assuming the '[' has already been read.
Definition at line 64 of file dimensionSetIO.C.
References IOstream::check(), dimensionSet::CURRENT, Foam::dimensions(), Foam::dimless, token::END_SQR, Foam::endl(), Foam::exit(), Foam::FatalIOError, FatalIOErrorInFunction, IOstream::info(), token::isNumber(), dimensionSet::LUMINOUS_INTENSITY, dimensionSet::MASS, token::number(), Foam::symbols::parseNoBegin(), and Istream::putBack().
Foam::Istream & read | ( | Istream & | is | ) |
Read.
Definition at line 121 of file dimensionSetIO.C.
References token::BEGIN_SQR, Foam::endl(), Foam::exit(), Foam::FatalIOError, FatalIOErrorInFunction, and IOstream::info().
Referenced by Foam::operator>>(), and UniformDimensionedField< Type >::UniformDimensionedField().
Foam::Ostream & write | ( | Ostream & | os | ) | const |
Write.
Definition at line 138 of file dimensionSetIO.C.
References token::BEGIN_SQR, IOstream::check(), token::END_SQR, dimensionSet::nDimensions, and token::SPACE.
Referenced by Foam::operator<<(), and streamlinesParticle::writeFields().
|
inline |
Return info proxy.
Definition at line 239 of file dimensionSet.H.
Referenced by Foam::atan2(), Foam::max(), Foam::min(), dimensionSet::operator+=(), dimensionSet::operator-=(), and dimensionSet::operator=().
Foam::scalar operator[] | ( | const dimensionType | type | ) | const |
Definition at line 140 of file dimensionSet.C.
References Foam::type().
Foam::scalar & operator[] | ( | const dimensionType | type | ) |
Definition at line 146 of file dimensionSet.C.
References Foam::type().
Foam::scalar operator[] | ( | const label | type | ) | const |
Definition at line 152 of file dimensionSet.C.
References Foam::type().
Foam::scalar & operator[] | ( | const label | type | ) |
Definition at line 158 of file dimensionSet.C.
References Foam::type().
bool operator== | ( | const dimensionSet & | ds | ) | const |
Definition at line 164 of file dimensionSet.C.
References Foam::mag().
bool operator!= | ( | const dimensionSet & | ds | ) | const |
Definition at line 182 of file dimensionSet.C.
References Foam::operator==().
bool operator= | ( | const dimensionSet & | ds | ) | const |
Definition at line 188 of file dimensionSet.C.
References Foam::abort(), Foam::endl(), Foam::FatalError, FatalErrorInFunction, and dimensionSet::info().
bool operator+= | ( | const dimensionSet & | ds | ) | const |
Definition at line 202 of file dimensionSet.C.
References Foam::abort(), Foam::endl(), Foam::FatalError, FatalErrorInFunction, and dimensionSet::info().
bool operator-= | ( | const dimensionSet & | ds | ) | const |
Definition at line 216 of file dimensionSet.C.
References Foam::abort(), Foam::endl(), Foam::FatalError, FatalErrorInFunction, and dimensionSet::info().
bool operator*= | ( | const dimensionSet & | ds | ) |
Definition at line 230 of file dimensionSet.C.
bool operator/= | ( | const dimensionSet & | ds | ) |
Definition at line 238 of file dimensionSet.C.
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
Function to check the argument is dimensionless.
for transcendental functions
|
friend |
|
friend |
Referenced by coupledFvPatch::delta(), cyclicFvPatchField< Type >::patchNeighbourField(), jumpCyclicFvPatchField< Type >::patchNeighbourField(), pointData::transform(), DSMCParcel< ParcelType >::transformProperties(), molecule::transformProperties(), CollidingParcel< ParcelType >::transformProperties(), MomentumParcel< ParcelType >::transformProperties(), and solidParticle::transformProperties().
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
static |
Names of the dimensions.
Definition at line 150 of file dimensionSet.H.
Referenced by Foam::operator<<().
|
static |
A small exponent with which to perform inexact comparisons.
Definition at line 156 of file dimensionSet.H.
Referenced by Foam::operator<<().