Templated basic entry that holds a constant value. More...
Public Member Functions | |
TypeName ("constant") | |
Constant (const word &entryName, const Type &value, const dimensionSet &dimensions=dimless) | |
Construct from components. More... | |
Constant (const word &entryName, const dictionary &dict) | |
Construct from entry name and dictionary. More... | |
Constant (const Constant< Type > &cnst) | |
Copy constructor. More... | |
virtual tmp< DataEntry< Type > > | clone () const |
Construct and return a clone. More... | |
virtual | ~Constant () |
Destructor. More... | |
Type | value (const scalar) const |
Return constant value. More... | |
Type | integrate (const scalar x1, const scalar x2) const |
Integrate between two values. More... | |
dimensioned< Type > | dimValue (const scalar) const |
Return dimensioned constant value. More... | |
dimensioned< Type > | dimIntegrate (const scalar x1, const scalar x2) const |
Integrate between two values and return dimensioned type. More... | |
virtual void | writeData (Ostream &os) const |
Write in dictionary format. More... | |
Private Member Functions | |
void | operator= (const Constant< Type > &) |
Disallow default bitwise assignment. More... | |
Private Attributes | |
Type | value_ |
Constant value. More... | |
dimensionSet | dimensions_ |
The dimension set. More... | |
Friends | |
Ostream & | operator (Ostream &os, const Constant< Type > &cnst) |
Ostream Operator. More... | |
Templated basic entry that holds a constant value.
Usage - for entry <entryName> having the value
:
<entryName> constant <value>
Definition at line 51 of file Constant.H.
Constant | ( | const word & | entryName, |
const Type & | value, | ||
const dimensionSet & | dimensions = dimless |
||
) |
Construct from components.
Constant | ( | const word & | entryName, |
const dictionary & | dict | ||
) |
Construct from entry name and dictionary.
Definition at line 31 of file Constant.C.
References token::BEGIN_SQR, dict, Constant::dimensions_, token::isWord(), Istream::putBack(), and Constant::value_.
Copy constructor.
Definition at line 73 of file Constant.C.
|
virtual |
Destructor.
Definition at line 84 of file Constant.C.
TypeName | ( | "constant" | ) |
Construct and return a clone.
Definition at line 103 of file Constant.H.
Type value | ( | const scalar | x | ) | const |
Return constant value.
Definition at line 91 of file Constant.C.
Type integrate | ( | const scalar | x1, |
const scalar | x2 | ||
) | const |
Integrate between two values.
Definition at line 98 of file Constant.C.
Foam::dimensioned< Type > dimValue | ( | const scalar | x | ) | const |
Return dimensioned constant value.
Definition at line 105 of file Constant.C.
Foam::dimensioned< Type > dimIntegrate | ( | const scalar | x1, |
const scalar | x2 | ||
) | const |
Integrate between two values and return dimensioned type.
Definition at line 113 of file Constant.C.
|
virtual |
Write in dictionary format.
Definition at line 63 of file ConstantIO.C.
References Foam::nl, and writeData().
|
private |
|
private |
Copyright © 2011-2018 OpenFOAM | OPENFOAM® is a registered trademark of OpenCFD Ltd.