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 & | readNoBeginOrEnd (Istream &is) |
| Read without the square brackets. More... | |
| Istream & | read (Istream &is) |
| Read. More... | |
| Ostream & | writeNoBeginOrEnd (Ostream &os) const |
| Write without the square brackets. More... | |
| Ostream & | write (Ostream &os) const |
| Write. More... | |
| Ostream & | writeInfoNoBeginOrEnd (Ostream &os) const |
| Write info without the square brackets. 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 59 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 80 of file dimensionSet.C.
| dimensionSet | ( | const dimensionSet & | ds | ) |
Copy constructor.
Definition at line 99 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 107 of file dimensionSet.C.
Referenced by Foam::pow(), and Foam::trans().

| void reset | ( | const dimensionSet & | ds | ) |
Definition at line 126 of file dimensionSet.C.
Referenced by LehrMilliesMewes::addToBinaryBreakupRate(), reuseTmpTmpDimensionedField< TypeR, Type1, TypeR, GeoMesh, PrimitiveField1, Field >::New(), reuseTmpTmpDimensionedField< TypeR, TypeR, Type2, GeoMesh, Field, PrimitiveField2 >::New(), reuseTmpTmpDimensionedField< TypeR, TypeR, TypeR, GeoMesh, Field, Field >::New(), Foam::New(), reuseTmpDimensionedField< TypeR, TypeR, GeoMesh, Field >::New(), reuseTmpTmpGeometricField< TypeR, Type1, TypeR, GeoMesh, PrimitiveField1, Field >::New(), reuseTmpTmpGeometricField< TypeR, TypeR, Type2, GeoMesh, Field, PrimitiveField2 >::New(), reuseTmpTmpGeometricField< TypeR, TypeR, TypeR, GeoMesh, Field, Field >::New(), and reuseTmpGeometricField< TypeR, TypeR, GeoMesh, Field >::New().

| Foam::Istream & readNoBeginOrEnd | ( | Istream & | is | ) |
Read without the square brackets.
Definition at line 64 of file dimensionSetIO.C.
References dimensionSet::CURRENT, Foam::dimensions(), Foam::dimless, token::isNumber(), dimensionSet::LUMINOUS_INTENSITY, Foam::symbols::parseNoBeginOrEnd(), and Istream::putBack().

| Foam::Istream & read | ( | Istream & | is | ) |
Read.
Definition at line 109 of file dimensionSetIO.C.
References token::BEGIN_SQR, IOstream::check(), token::END_SQR, Foam::endl(), Foam::exit(), Foam::FatalIOError, FatalIOErrorInFunction, and IOstream::info().
Referenced by Foam::operator>>(), and UniformDimensionedField< Type >::UniformDimensionedField().


| Foam::Ostream & writeNoBeginOrEnd | ( | Ostream & | os | ) | const |
Write without the square brackets.
Definition at line 140 of file dimensionSetIO.C.
References dimensionSet::nDimensions, and token::SPACE.
| Foam::Ostream & write | ( | Ostream & | os | ) | const |
Write.
Definition at line 160 of file dimensionSetIO.C.
References token::BEGIN_SQR, IOstream::check(), and token::END_SQR.
Referenced by Foam::operator<<(), Foam::writeEntry(), and streamlinesParticle::writeFields().


| Foam::Ostream & writeInfoNoBeginOrEnd | ( | Ostream & | os | ) | const |
Write info without the square brackets.
Definition at line 175 of file dimensionSetIO.C.
References dimensionSet::dimensionTypeNames_, Foam::first(), Foam::mag(), dimensionSet::nDimensions, dimensionSet::smallExponent, and token::SPACE.

|
inline |
Return info proxy.
Definition at line 245 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 137 of file dimensionSet.C.
References Foam::type().

| Foam::scalar & operator[] | ( | const dimensionType | type | ) |
Definition at line 143 of file dimensionSet.C.
References Foam::type().

| Foam::scalar operator[] | ( | const label | type | ) | const |
Definition at line 149 of file dimensionSet.C.
References Foam::type().

| Foam::scalar & operator[] | ( | const label | type | ) |
Definition at line 155 of file dimensionSet.C.
References Foam::type().

| bool operator== | ( | const dimensionSet & | ds | ) | const |
Definition at line 161 of file dimensionSet.C.
References Foam::mag().

| bool operator!= | ( | const dimensionSet & | ds | ) | const |
Definition at line 179 of file dimensionSet.C.
References Foam::operator==().

| bool operator= | ( | const dimensionSet & | ds | ) | const |
Definition at line 185 of file dimensionSet.C.
References Foam::abort(), Foam::endl(), Foam::FatalError, FatalErrorInFunction, and dimensionSet::info().

| bool operator+= | ( | const dimensionSet & | ds | ) | const |
Definition at line 199 of file dimensionSet.C.
References Foam::abort(), Foam::endl(), Foam::FatalError, FatalErrorInFunction, and dimensionSet::info().

| bool operator-= | ( | const dimensionSet & | ds | ) | const |
Definition at line 213 of file dimensionSet.C.
References Foam::abort(), Foam::endl(), Foam::FatalError, FatalErrorInFunction, and dimensionSet::info().

| bool operator*= | ( | const dimensionSet & | ds | ) |
Definition at line 227 of file dimensionSet.C.
| bool operator/= | ( | const dimensionSet & | ds | ) |
Definition at line 235 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 cyclicFvPatch::delta(), processorFvPatch::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 dimensionSet::writeInfoNoBeginOrEnd().
|
static |
A small exponent with which to perform inexact comparisons.
Definition at line 156 of file dimensionSet.H.
Referenced by dimensionSet::writeInfoNoBeginOrEnd().