Go to the documentation of this file.
38 #ifndef dimensionedType_H
39 #define dimensionedType_H
57 template<
class Type>
class dimensioned;
60 Istream&
operator>>(Istream& is, dimensioned<Type>& dt);
75 dimensionSet dimensions_;
92 void initialize(Istream& is,
const bool checkDims);
109 const dictionary&
dict,
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)
461 Ostream&
operator<<(Ostream&
os,
const dimensioned<Type>& dt);
463 template<
class Type, direction r>
467 const dimensioned<Type>&,
474 sqr(
const dimensioned<Type>&);
478 magSqr(
const dimensioned<Type>& dt);
482 mag(
const dimensioned<Type>& dt);
487 const dimensioned<Type>&,
488 const dimensioned<Type>&
494 const dimensioned<Type>&,
495 const dimensioned<Type>&
499 dimensioned<Type>
max(
const dimensioned<Type>&,
const dimensioned<Type>&);
502 dimensioned<Type>
min(
const dimensioned<Type>&,
const dimensioned<Type>&);
505 bool operator<(
const dimensioned<Type>&,
const dimensioned<Type>&);
508 bool operator>(
const dimensioned<Type>&,
const dimensioned<Type>&);
511 dimensioned<Type>
operator+(
const dimensioned<Type>&,
const dimensioned<Type>&);
514 dimensioned<Type>
operator-(
const dimensioned<Type>&);
517 dimensioned<Type>
operator-(
const dimensioned<Type>&,
const dimensioned<Type>&);
520 dimensioned<Type>
operator*
522 const dimensioned<scalar>&,
523 const dimensioned<Type>&
527 dimensioned<Type>
operator/
529 const dimensioned<Type>&,
530 const dimensioned<scalar>&
534 #define PRODUCT_OPERATOR(product, op, opFunc) \
536 template<class Type1, class Type2> \
537 dimensioned<typename product<Type1, Type2>::type> \
538 operator op(const dimensioned<Type1>&, const dimensioned<Type2>&); \
540 template<class Type, class Form, class Cmpt, direction nCmpt> \
541 dimensioned<typename product<Type, Form>::type> \
544 const dimensioned<Type>&, \
545 const VectorSpace<Form,Cmpt,nCmpt>& \
548 template<class Type, class Form, class Cmpt, direction nCmpt> \
549 dimensioned<typename product<Form, Type>::type> \
552 const VectorSpace<Form,Cmpt,nCmpt>&, \
553 const dimensioned<Type>& \
561 #undef PRODUCT_OPERATOR
dimensioned< cmptType > operator[](const direction d) const
A keyword and a list of tokens comprise a primitiveEntry. A primitiveEntry can be read,...
A class for handling words, derived from Foam::string.
dimensioned< Type > T() const
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))
dimensioned< Type > cmptMultiply(const dimensioned< Type > &, const dimensioned< Type > &)
static constexpr const zero Zero
bool read(const dictionary &dict)
tmp< faMatrix< Type > > operator-(const faMatrix< Type > &)
void dot(FieldField< Field1, typename innerProduct< Type1, Type2 >::type > &f, const FieldField< Field1, Type1 > &f1, const FieldField< Field2, Type2 > &f2)
auto key(const Type &t) -> typename std::enable_if< std::is_enum< Type >::value, typename std::underlying_type< Type >::type >::type
const word & name() const
A class representing the concept of 1 (one) that can be used to avoid manipulating objects known to b...
symmTypeOfRank< typename pTraits< arg1 >::cmptType, arg2 *direction(pTraits< arg1 >::rank) >::type type
void operator+=(const dimensioned< Type > &dt)
Istream & operator>>(Istream &, directionInfo &)
const Type & value() const
Dimension set for the base types, which can be used to implement rigorous dimension checking for alge...
label min(const labelHashSet &set, label minValue=labelMax)
dimensioned< typename typeOfMag< Type >::type > magSqr(const dimensioned< Type > &dt)
Ostream & operator<<(Ostream &, const boundaryPatch &p)
void operator*=(const scalar s)
bool readIfPresent(const dictionary &dict)
static dimensioned< Type > lookupOrDefault(const word &name, const dictionary &dict, const dimensionSet &dims=dimless, const Type &deflt=Type(Zero))
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
void operator/=(const scalar s)
void writeEntry(const word &keyword, Ostream &os) const
dimensioned(const Type &val)
dimensionedScalar pow(const dimensionedScalar &ds, const dimensionedScalar &expt)
label max(const labelHashSet &set, label maxValue=labelMin)
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
OBJstream os(runTime.globalPath()/outputName)
Direction is an 8-bit unsigned integer type used to represent Cartesian directions,...
A HashTable similar to std::unordered_map.
static dimensioned< Type > getOrDefault(const word &name, const dictionary &dict, const dimensionSet &dims=dimless, const Type &deflt=Type(Zero))
dimensioned< Type > cmptDivide(const dimensioned< Type > &, const dimensioned< Type > &)
static dimensioned< Type > lookupOrAddToDict(const word &name, dictionary &dict, const dimensionSet &dims=dimless, const Type &deflt=Type(Zero))
#define FOAM_DEPRECATED(since)
dimensionedSymmTensor sqr(const dimensionedVector &dv)
void replace(const direction d, const dimensioned< cmptType > &dc)
dimensioned< cmptType > component(const direction d) const
A traits class, which is primarily used for primitives.
tmp< faMatrix< Type > > operator+(const faMatrix< Type > &, const faMatrix< Type > &)
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
const dimensionedScalar e
@ REGEX
Regular expression.
void operator-=(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
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
const dimensionSet & dimensions() const
#define PRODUCT_OPERATOR(product, op, opFunc)
void cross(FieldField< Field1, typename crossProduct< Type1, Type2 >::type > &f, const FieldField< Field1, Type1 > &f1, const FieldField< Field2, Type2 > &f2)
pTraits< Type >::cmptType cmptType
static bool checkDims(const char *what, const dimensionSet &a, const dimensionSet &b)
static dimensioned< Type > getOrAddToDict(const word &name, dictionary &dict, const dimensionSet &dims=dimless, const Type &deflt=Type(Zero))
const dimensionSet dimless
bool operator>(const IOstreamOption::versionNumber &a, const IOstreamOption::versionNumber &b) noexcept
A class representing the concept of 0 (zero) that can be used to avoid manipulating objects known to ...
void dotdot(FieldField< Field1, typename scalarProduct< Type1, Type2 >::type > &f, const FieldField< Field1, Type1 > &f1, const FieldField< Field2, Type2 > &f2)