Go to the documentation of this file.
53 #ifndef dimensionSet_H
54 #define dimensionSet_H
134 void push(
const token& t);
138 void unpop(
const token& t);
144 explicit tokeniser(
Istream& is);
154 bool hasToken()
const;
158 void putBack(
const token&);
160 void splitWord(
const word&);
162 static bool valid(
char c);
164 static label priority(
const token& t);
170 void round(
const scalar tol);
174 const label lastPrior,
176 const HashTable<dimensionedScalar>&
190 static bool checking(
const bool on) noexcept
193 debug =
static_cast<int>(on);
200 return static_cast<bool>(
debug);
215 const scalar temperature,
217 const scalar current = 0,
218 const scalar luminousIntensity = 0
231 const word& entryName,
233 const bool mandatory =
true
240 const word& entryName,
241 const bool mandatory =
true
281 const
word& entryName,
283 const
bool mandatory = true
330 scalar operator[](const label) const;
331 scalar& operator[](const label);
430 #include "dimensionSets.H"
int debug
Static debugging option.
static constexpr int nDimensions
There are 7 base dimensions.
static autoPtr< T > New(Args &&... args)
Construct autoPtr of T with forwarding arguments.
dimensionSet trans(const dimensionSet &ds)
Check the argument is dimensionless (for transcendental functions)
ClassName("dimensionSet")
autoPtr< dimensionSet > clone() const
Construct and return a clone.
bool readEntry(const word &entryName, const dictionary &dict, const bool mandatory=true)
A class for handling words, derived from Foam::string.
dimensioned< Type > cmptMultiply(const dimensioned< Type > &, const dimensioned< Type > &)
dimensionSet pow2(const dimensionSet &ds)
static const scalar smallExponent
Tolerance for 'small' exponents, for near-zero rounding.
dimensionedScalar posPart(const dimensionedScalar &ds)
dimensionedScalar atan2(const dimensionedScalar &x, const dimensionedScalar &y)
dimensionedScalar neg0(const dimensionedScalar &ds)
A token holds an item read from Istream.
dimensionedScalar pos0(const dimensionedScalar &ds)
Dimension set for the base types, which can be used to implement rigorous dimension checking for alge...
dimensionedScalar sign(const dimensionedScalar &ds)
dimensionSet transform(const dimensionSet &ds)
Return the argument; transformations do not change the dimensions.
label min(const labelHashSet &set, label minValue=labelMax)
Find the min value in labelHashSet, optionally limited by second argument.
dimensionSet()
Default construct (dimensionless).
dimensioned< typename typeOfMag< Type >::type > magSqr(const dimensioned< Type > &dt)
dimensionedScalar pow025(const dimensionedScalar &ds)
dimensionedScalar hypot(const dimensionedScalar &x, const dimensionedScalar &y)
dimensionType
Enumeration for the dimension exponents.
dimensionedScalar pow4(const dimensionedScalar &ds)
bool dimensionless() const
Return true if it is dimensionless.
dimensionedScalar pow6(const dimensionedScalar &ds)
Istream & read(Istream &is, scalar &multiplier, const dictionary &)
Read using provided units. Used only in initial parsing.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
dimensionedScalar pow3(const dimensionedScalar &ds)
dimensionedSphericalTensor inv(const dimensionedSphericalTensor &dt)
Macro definitions for declaring ClassName(), NamespaceName(), etc.
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
FixedList< scalar, 7 > list_type
The array of dimension exponents.
dimensionedScalar pow(const dimensionedScalar &ds, const dimensionedScalar &expt)
void clear()
Clear exponents - resets to be dimensionless.
label max(const labelHashSet &set, label maxValue=labelMin)
Find the max value in labelHashSet, optionally limited by second argument.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
dimensionedScalar pow5(const dimensionedScalar &ds)
OBJstream os(runTime.globalPath()/outputName)
Generic dimensioned Type class.
const FixedList< scalar, 7 > & values() const noexcept
Const access to the exponents as a list.
A HashTable similar to std::unordered_map.
dimensioned< Type > cmptDivide(const dimensioned< Type > &, const dimensioned< Type > &)
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Ostream & write(Ostream &os, scalar &multiplier, const dimensionSets &) const
Write using provided units.
dimensionedSymmTensor sqr(const dimensionedVector &dv)
dimensionedScalar negPart(const dimensionedScalar &ds)
dimensionSet clip(const dimensionSet &ds1, const dimensionSet &ds2)
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
dimensionedScalar sqrt(const dimensionedScalar &ds)
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
dimensionSet invTransform(const dimensionSet &ds)
Return the argument; transformations do not change the dimensions.
const dimensionedScalar c
Speed of light in a vacuum.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
dimensionedScalar cbrt(const dimensionedScalar &ds)
dimensionedScalar neg(const dimensionedScalar &ds)
static bool checking() noexcept
True if dimension checking is enabled (the usual default)
Construction of unit sets.
void reset(const dimensionSet &ds)
Copy assign the exponents from the dimensionSet.
dimensionedScalar pos(const dimensionedScalar &ds)