35 #ifndef dimensionedType_H 36 #define dimensionedType_H 50 template<
class Type>
class dimensioned;
53 Istream&
operator>>(Istream&, dimensioned<Type>&);
56 Ostream& operator<<(Ostream&, const dimensioned<Type>&);
73 dimensionSet dimensions_;
83 void initialize(Istream& is);
178 const Type&
value()
const;
224 friend Istream&
operator>> <Type>
227 friend Ostream& operator<< <Type>
234 template<
class Type, direction r>
291 const dimensioned<scalar>&,
299 const dimensioned<scalar>&
303 #define PRODUCT_OPERATOR(product, op, opFunc) \ 305 template<class Type1, class Type2> \ 306 dimensioned<typename product<Type1, Type2>::type> \ 307 operator op(const dimensioned<Type1>&, const dimensioned<Type2>&); \ 309 template<class Type, class Form, class Cmpt, direction nCmpt> \ 310 dimensioned<typename product<Type, Form>::type> \ 313 const dimensioned<Type>&, \ 314 const VectorSpace<Form,Cmpt,nCmpt>& \ 317 template<class Type, class Form, class Cmpt, direction nCmpt> \ 318 dimensioned<typename product<Form, Type>::type> \ 321 const VectorSpace<Form,Cmpt,nCmpt>&, \ 322 const dimensioned<Type>& \ 330 #undef PRODUCT_OPERATOR static dimensioned< Type > lookupOrAddToDict(const word &, dictionary &, const dimensionSet &dims=dimless, const Type &defaultValue=pTraits< Type >::zero)
Construct from dictionary, with default value.
A list of keyword definitions, which are a keyword followed by any number of values (e...
dimensioned< Type > max(const dimensioned< Type > &, const dimensioned< Type > &)
static dimensioned< Type > lookupOrDefault(const word &, const dictionary &, const dimensionSet &dims=dimless, const Type &defaultValue=pTraits< Type >::zero)
Construct from dictionary, with default dimensions and value.
void operator*=(const scalar)
dimensionedSymmTensor sqr(const dimensionedVector &dv)
An Istream is an abstract base class for all input systems (streams, files, token lists etc)...
Traits class for primitives.
bool readIfPresent(const dictionary &)
Update the value of dimensioned<Type> if found in the dictionary.
void replace(const direction, const dimensioned< cmptType > &)
Return a component with a dimensioned<cmptType>
void cross(FieldField< Field1, typename crossProduct< Type1, Type2 >::type > &f, const FieldField< Field1, Type1 > &f1, const FieldField< Field2, Type2 > &f2)
Generic dimensioned Type class.
void dotdot(FieldField< Field1, typename scalarProduct< Type1, Type2 >::type > &f, const FieldField< Field1, Type1 > &f1, const FieldField< Field2, Type2 > &f2)
void outer(FieldField< Field1, typename outerProduct< Type1, Type2 >::type > &f, const FieldField< Field1, Type1 > &f1, const FieldField< Field2, Type2 > &f2)
void dot(FieldField< Field1, typename innerProduct< Type1, Type2 >::type > &f, const FieldField< Field1, Type1 > &f1, const FieldField< Field2, Type2 > &f2)
dimensioned< Type > cmptDivide(const dimensioned< Type > &, const dimensioned< Type > &)
#define PRODUCT_OPERATOR(product, op, opFunc)
Dimension set for the base types.
pTraits< Type >::cmptType cmptType
Component type.
void read(const dictionary &)
Update the value of dimensioned<Type>
A class for handling words, derived from string.
Istream & operator>>(Istream &, directionInfo &)
const Type & value() const
Return const reference to value.
dimensioned< cmptType > component(const direction) const
Return a component as a dimensioned<cmptType>
tmp< fvMatrix< Type > > operator-(const fvMatrix< Type > &)
void operator+=(const dimensioned< Type > &)
tmp< fvMatrix< Type > > operator+(const fvMatrix< Type > &, const fvMatrix< Type > &)
An STL-conforming hash table.
dimensioned< Type > cmptMultiply(const dimensioned< Type > &, const dimensioned< Type > &)
dimensioned< scalar > magSqr(const dimensioned< Type > &)
An Ostream is an abstract base class for all output systems (streams, files, token lists...
bool operator>(const instant &, const instant &)
void operator/=(const scalar)
dimensioned()
Null constructor.
dimensioned< Type > T() const
Return transpose.
const word & name() const
Return const reference to name.
dimensioned< Type > min(const dimensioned< Type > &, const dimensioned< Type > &)
symmTypeOfRank< typename pTraits< arg1 >::cmptType, arg2 *direction(pTraits< arg1 >::rank) >::type type
dimensionedScalar pow(const dimensionedScalar &ds, const dimensionedScalar &expt)
dimensioned< cmptType > operator[](const direction) const
Return a component as a dimensioned<cmptType>
Direction is an 8-bit unsigned integer type used to represent the Cartesian directions etc...
const dimensionSet dimless(0, 0, 0, 0, 0, 0, 0)
const dimensionSet & dimensions() const
Return const reference to dimensions.
A class representing the concept of 0 used to avoid unnecessary manipulations for objects that are kn...
dimensioned< scalar > mag(const dimensioned< Type > &)
void operator-=(const dimensioned< Type > &)