38#ifndef dimensionedType_H
39#define dimensionedType_H
57template<
class Type>
class dimensioned;
110 const bool mandatory =
true,
222 const word& entryName
249 const Type& deflt = Type(
Zero)
258 const Type& deflt = Type(
Zero)
269 const Type& deflt = Type(
Zero)
279 const Type& deflt = Type(
Zero)
298 const Type&
value()
const;
366 friend Istream&
operator>> <Type>
410 const Type& deflt = Type(
Zero)
422 const Type& deflt = Type(
Zero)
436 const Type& deflt = Type(
Zero)
449 const Type& deflt = Type(
Zero)
463template<
class Type, direction r>
534#define PRODUCT_OPERATOR(product, op, opFunc) \
536template<class Type1, class Type2> \
537dimensioned<typename product<Type1, Type2>::type> \
538operator op(const dimensioned<Type1>&, const dimensioned<Type2>&); \
540template<class Type, class Form, class Cmpt, direction nCmpt> \
541dimensioned<typename product<Type, Form>::type> \
544 const dimensioned<Type>&, \
545 const VectorSpace<Form,Cmpt,nCmpt>& \
548template<class Type, class Form, class Cmpt, direction nCmpt> \
549dimensioned<typename product<Form, Type>::type> \
552 const VectorSpace<Form,Cmpt,nCmpt>&, \
553 const dimensioned<Type>& \
561#undef PRODUCT_OPERATOR
A HashTable similar to std::unordered_map.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Dimension set for the base types, which can be used to implement rigorous dimension checking for alge...
Generic dimensioned Type class.
dimensioned< cmptType > component(const direction d) const
Return a component as a dimensioned<cmptType>
void replace(const direction d, const dimensioned< cmptType > &dc)
Return a component with a dimensioned<cmptType>
void operator*=(const scalar s)
void operator-=(const dimensioned< Type > &dt)
Type value_type
The underlying data type.
dimensioned()
A dimensionless Zero, named "0".
dimensioned(const Type &val)
Implicit construct dimensionless from given value.
static dimensioned< Type > lookupOrAddToDict(const word &name, dictionary &dict, const dimensionSet &dims=dimless, const Type &deflt=Type(Zero))
Construct dimensioned from dictionary, with default value.
dimensioned< cmptType > operator[](const direction d) const
Return a component as a dimensioned<cmptType>
const dimensionSet & dimensions() const
Return const reference to dimensions.
bool read(const dictionary &dict)
pTraits< Type >::cmptType cmptType
Component type.
const Type & value() const
Return const reference to value.
void writeEntry(const word &keyword, Ostream &os) const
Write as a dictionary entry with keyword.
bool readIfPresent(const dictionary &dict)
static dimensioned< Type > lookupOrDefault(const word &name, const dictionary &dict, const dimensionSet &dims=dimless, const Type &deflt=Type(Zero))
static dimensioned< Type > getOrDefault(const word &name, const dictionary &dict, const dimensionSet &dims=dimless, const Type &deflt=Type(Zero))
Construct dimensioned from dictionary, with default value.
const word & name() const
Return const reference to name.
void operator+=(const dimensioned< Type > &dt)
void operator/=(const scalar s)
static dimensioned< Type > getOrAddToDict(const word &name, dictionary &dict, const dimensionSet &dims=dimless, const Type &deflt=Type(Zero))
Construct dimensioned from dictionary, with default value.
dimensioned< Type > T() const
Return transpose.
An edge is a list of two point labels. The functionality it provides supports the discretisation on a...
option
Enumeration for the data type and search/match modes (bitmask)
@ REGEX
Regular expression.
A class representing the concept of 1 (one) that can be used to avoid manipulating objects known to b...
A traits class, which is primarily used for primitives.
A keyword and a list of tokens comprise a primitiveEntry. A primitiveEntry can be read,...
type
Volume classification types.
A class for handling words, derived from Foam::string.
A class representing the concept of 0 (zero) that can be used to avoid manipulating objects known to ...
#define PRODUCT_OPERATOR(product, op, opFunc)
Direction is an 8-bit unsigned integer type used to represent Cartesian directions,...
OBJstream os(runTime.globalPath()/outputName)
gmvFile<< "tracers "<< particles.size()<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().x()<< " ";}gmvFile<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().y()<< " ";}gmvFile<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().z()<< " ";}gmvFile<< nl;forAll(lagrangianScalarNames, i){ word name=lagrangianScalarNames[i];IOField< scalar > s(IOobject(name, runTime.timeName(), cloud::prefix, mesh, IOobject::MUST_READ, IOobject::NO_WRITE))
tmp< faMatrix< Type > > operator-(const faMatrix< Type > &)
Unary negation.
label max(const labelHashSet &set, label maxValue=labelMin)
Find the max value in labelHashSet, optionally limited by second argument.
const dimensionSet dimless
Dimensionless.
dimensionedSymmTensor sqr(const dimensionedVector &dv)
tmp< faMatrix< Type > > operator+(const faMatrix< Type > &, const faMatrix< Type > &)
dimensioned< Type > cmptDivide(const dimensioned< Type > &, const dimensioned< Type > &)
void dot(FieldField< Field1, typename innerProduct< Type1, Type2 >::type > &f, const FieldField< Field1, Type1 > &f1, const FieldField< Field2, Type2 > &f2)
Ostream & operator<<(Ostream &, const boundaryPatch &p)
Write boundaryPatch as dictionary entries (without surrounding braces)
dimensionedScalar pow(const dimensionedScalar &ds, const dimensionedScalar &expt)
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
static bool checkDims(const char *what, const dimensionSet &a, const dimensionSet &b)
Istream & operator>>(Istream &, directionInfo &)
label min(const labelHashSet &set, label minValue=labelMax)
Find the min value in labelHashSet, optionally limited by second argument.
static constexpr const zero Zero
Global zero (0)
dimensioned< Type > cmptMultiply(const dimensioned< Type > &, const dimensioned< Type > &)
bool operator<(const IOstreamOption::versionNumber &a, const IOstreamOption::versionNumber &b) noexcept
Version A older than B.
void dotdot(FieldField< Field1, typename scalarProduct< Type1, Type2 >::type > &f, const FieldField< Field1, Type1 > &f1, const FieldField< Field2, Type2 > &f2)
void cross(FieldField< Field1, typename crossProduct< Type1, Type2 >::type > &f, const FieldField< Field1, Type1 > &f1, const FieldField< Field2, Type2 > &f2)
dimensioned< typename typeOfMag< Type >::type > magSqr(const dimensioned< Type > &dt)
void outer(FieldField< Field1, typename outerProduct< Type1, Type2 >::type > &f, const FieldField< Field1, Type1 > &f1, const FieldField< Field2, Type2 > &f2)
bool operator>(const IOstreamOption::versionNumber &a, const IOstreamOption::versionNumber &b) noexcept
Version A newer than B.
#define FOAM_DEPRECATED(since)