53 #ifndef Foam_dimensionSet_H 54 #define Foam_dimensionSet_H 135 void push(
const token& t);
139 void unpop(
const token& t);
145 explicit tokeniser(
Istream& is);
152 bool hasToken()
const;
156 void putBack(
const token&);
158 void splitWord(
const word&);
160 static bool valid(
char c);
162 static label priority(
const token& t);
168 void round(
const scalar tol);
172 const label lastPrior,
174 const HashTable<dimensionedScalar>&
191 debug =
static_cast<int>(on);
198 return static_cast<bool>(
debug);
213 const scalar temperature,
215 const scalar current = 0,
216 const scalar luminousIntensity = 0
229 const word& entryName,
230 const dictionary&
dict,
271 const
word& entryName,
284 const
word& entryName,
dimensionedScalar sign(const dimensionedScalar &ds)
bool operator/=(const dimensionSet &)
autoPtr< dimensionSet > clone() const
Construct and return a clone.
bitSet operator~(const bitSet &bitset)
Bitset complement, returns a copy of the bitset with all its bits flipped.
dimensionSet invTransform(const dimensionSet &ds)
Return the argument; transformations do not change the dimensions.
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
A list of keyword definitions, which are a keyword followed by a number of values (eg...
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
label max(const labelHashSet &set, label maxValue=labelMin)
Find the max value in labelHashSet, optionally limited by second argument.
dimensionedSymmTensor sqr(const dimensionedVector &dv)
dimensionedSphericalTensor inv(const dimensionedSphericalTensor &dt)
An Istream is an abstract base class for all input systems (streams, files, token lists etc)...
A token holds an item read from Istream.
bool operator-=(const dimensionSet &) const
dimensionedScalar sqrt(const dimensionedScalar &ds)
bool readEntry(const word &entryName, const dictionary &dict, IOobjectOption::readOption readOpt=IOobjectOption::MUST_READ)
Update the dimensions from dictionary entry. FatalIOError if it is found and the number of tokens is ...
dimensionedScalar pow025(const dimensionedScalar &ds)
static const scalar smallExponent
Tolerance for 'small' exponents, for near-zero rounding.
bool operator=(const dimensionSet &) const
dimensionSet operator &&(const dimensionSet &ds1, const dimensionSet &ds2)
ClassName("dimensionSet")
dimensionedScalar stabilise(const dimensionedScalar &x, const dimensionedScalar &y)
Ostream & write(Ostream &os, scalar &multiplier, const dimensionSets &writeUnits) const
Write using provided write units, return scaling in multiplier.
dimensionedScalar operator/(const scalar s1, const dimensionedScalar &ds2)
tmp< faMatrix< Type > > operator+(const faMatrix< Type > &, const faMatrix< Type > &)
dimensionedScalar posPart(const dimensionedScalar &ds)
dimensionedScalar neg(const dimensionedScalar &ds)
dimensionedScalar pow5(const dimensionedScalar &ds)
dimensioned< Type > cmptDivide(const dimensioned< Type > &, const dimensioned< Type > &)
bool operator*=(const dimensionSet &)
dimensionedScalar pos(const dimensionedScalar &ds)
Dimension set for the base types, which can be used to implement rigorous dimension checking for alge...
const FixedList< scalar, 7 > & values() const noexcept
Const access to the exponents as a list.
tmp< faMatrix< Type > > operator*(const areaScalarField::Internal &, const faMatrix< Type > &)
FixedList< scalar, 7 > list_type
The array of dimension exponents.
const dimensionedScalar b
Wien displacement law constant: default SI units: [m.K].
A class for handling words, derived from Foam::string.
Istream & operator>>(Istream &, directionInfo &)
dimensionedScalar cbrt(const dimensionedScalar &ds)
dimensionedScalar neg0(const dimensionedScalar &ds)
dimensionSet()
Default construct (dimensionless).
Reading is optional [identical to LAZY_READ].
bool operator+=(const dimensionSet &) const
A HashTable similar to std::unordered_map.
label min(const labelHashSet &set, label minValue=labelMax)
Find the min value in labelHashSet, optionally limited by second argument.
dimensionSet pow2(const dimensionSet &ds)
tmp< faMatrix< Type > > operator-(const faMatrix< Type > &)
Unary negation.
bool operator!=(const dimensionSet &) const
dimensioned< Type > cmptMultiply(const dimensioned< Type > &, const dimensioned< Type > &)
void reset(const dimensionSet &ds)
Copy assign the exponents from the dimensionSet.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
dimensionedScalar pos0(const dimensionedScalar &ds)
dimensionedScalar atan2(const dimensionedScalar &x, const dimensionedScalar &y)
int debug
Static debugging option.
OBJstream os(runTime.globalPath()/outputName)
dimensioned< Type > lerp(const dimensioned< Type > &a, const dimensioned< Type > &b, const scalar t)
dimensionSet trans(const dimensionSet &ds)
Check the argument is dimensionless (for transcendental functions)
bool readIfPresent(const word &entryName, const dictionary &dict)
Update the dimensions from dictionary entry. FatalIOError if it is found and the number of tokens is ...
bitSet operator^(const bitSet &a, const bitSet &b)
Bitwise-XOR of two bitsets to form a unique bit-set.
dimensionedScalar pow(const dimensionedScalar &ds, const dimensionedScalar &expt)
void clear()
Clear exponents - resets to be dimensionless.
Ostream & operator<<(Ostream &, const boundaryPatch &p)
Write boundaryPatch as dictionary entries (without surrounding braces)
dimensionedScalar pow3(const dimensionedScalar &ds)
scalar operator[](const dimensionType) const
static bool checking() noexcept
True if dimension checking is enabled (the usual default)
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
tmp< GeometricField< Type, faPatchField, areaMesh > > operator &(const faMatrix< Type > &, const DimensionedField< Type, areaMesh > &)
Macro definitions for declaring ClassName(), NamespaceName(), etc.
const dimensionedScalar c
Speed of light in a vacuum.
A simple container of IOobject preferences. Can also be used for general handling of read/no-read/rea...
dimensionedScalar pow4(const dimensionedScalar &ds)
static constexpr int nDimensions
There are 7 base dimensions.
dimensionedScalar pow6(const dimensionedScalar &ds)
dimensionType
Enumeration for the dimension exponents.
Pointer management similar to std::unique_ptr, with some additional methods and type checking...
static autoPtr< T > New(Args &&... args)
Construct autoPtr with forwarding arguments.
dimensionSet transform(const dimensionSet &ds)
Return the argument; transformations do not change the dimensions.
bool operator==(const dimensionSet &) const
dimensionedScalar hypot(const dimensionedScalar &x, const dimensionedScalar &y)
bool dimensionless() const
Return true if it is dimensionless.
dimensioned< typename typeOfMag< Type >::type > magSqr(const dimensioned< Type > &dt)
Istream & read(Istream &is, scalar &multiplier, const dictionary &)
Read using provided units, return scaling in multiplier. Used only in initial parsing.
dimensionedScalar negPart(const dimensionedScalar &ds)
dimensionSet clamp(const dimensionSet &a, const dimensionSet &range)
Construction of unit sets.
readOption
Enumeration defining read preferences.