Public Member Functions | Friends | List of all members
Constant< Type > Class Template Reference

Templated basic entry that holds a constant value. More...

Inheritance diagram for Constant< Type >:
Inheritance graph
[legend]
Collaboration diagram for Constant< Type >:
Collaboration graph
[legend]

Public Member Functions

 TypeName ("constant")
 
 Constant (const word &entryName, const dictionary &dict)
 Construct from entry name and Istream. 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...
 
- Public Member Functions inherited from DataEntry< Type >
 TypeName ("DataEntry") declareRunTimeSelectionTable(autoPtr
 Runtime type information. More...
 
 DataEntry (const word &entryName)
 Construct from entry name. More...
 
 DataEntry (const DataEntry< Type > &de)
 Copy constructor. More...
 
virtual ~DataEntry ()
 Destructor. More...
 
const wordname () const
 Return the name of the entry. More...
 
virtual void convertTimeBase (const Time &t)
 Convert time. More...
 
virtual tmp< Field< Type > > value (const scalarField &x) const
 Return value as a function of (scalar) independent variable. More...
 
virtual tmp< Field< Type > > integrate (const scalarField &x1, const scalarField &x2) const
 Integrate between two (scalar) values. More...
 
virtual tmp< Field< dimensioned< Type > > > dimValue (const scalarField &x) const
 Return dimensioned type as a function of (scalar) More...
 
virtual tmp< Field< dimensioned< Type > > > dimIntegrate (const scalarField &x1, const scalarField &x2) const
 Integrate between two scalar fields and return a field of. More...
 
- Public Member Functions inherited from refCount
 refCount ()
 Construct null with zero count. More...
 
int count () const
 Return the reference count. More...
 
bool okToDelete () const
 Return true if the reference count is zero. More...
 
void resetRefCount ()
 Reset the reference count to zero. More...
 
void operator++ ()
 Increment the reference count. More...
 
void operator++ (int)
 Increment the reference count. More...
 
void operator-- ()
 Decrement the reference count. More...
 
void operator-- (int)
 Decrement the reference count. More...
 

Friends

Ostreamoperator (Ostream &os, const Constant< Type > &cnst)
 Ostream Operator. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from DataEntry< Type >
static autoPtr< DataEntry< Type > > New (const word &entryName, const dictionary &dict)
 Selector. More...
 
- Public Attributes inherited from DataEntry< Type >
 DataEntry
 
 dictionary
 
const wordentryName
 
const word const dictionarydict
 
const word const dictionary entryName
 
const word const dictionary dict
 
- Protected Attributes inherited from DataEntry< Type >
const word name_
 Name of entry. More...
 

Detailed Description

template<class Type>
class Foam::Constant< Type >

Templated basic entry that holds a constant value.

Usage - for entry <entryName> having the value

:

    <entryName>    constant  <value>
Source files

Definition at line 51 of file Constant.H.

Constructor & Destructor Documentation

Constant ( const word entryName,
const dictionary dict 
)

Construct from entry name and Istream.

Definition at line 31 of file Constant.C.

References token::BEGIN_SQR, token::isWord(), and dictionary::lookup().

Here is the call graph for this function:

Constant ( const Constant< Type > &  cnst)

Copy constructor.

Definition at line 59 of file Constant.C.

~Constant ( )
virtual

Destructor.

Definition at line 70 of file Constant.C.

Referenced by Constant< Type >::clone().

Here is the caller graph for this function:

Member Function Documentation

TypeName ( "constant"  )
virtual tmp<DataEntry<Type> > clone ( ) const
inlinevirtual

Construct and return a clone.

Reimplemented from DataEntry< Type >.

Definition at line 95 of file Constant.H.

References Constant< Type >::dimIntegrate(), Constant< Type >::dimValue(), Constant< Type >::integrate(), Constant< Type >::value(), Constant< Type >::writeData(), and Constant< Type >::~Constant().

Here is the call graph for this function:

Type value ( const scalar  x) const
virtual

Return constant value.

Reimplemented from DataEntry< Type >.

Definition at line 77 of file Constant.C.

Referenced by Constant< Type >::clone().

Here is the caller graph for this function:

Type integrate ( const scalar  x1,
const scalar  x2 
) const
virtual

Integrate between two values.

Reimplemented from DataEntry< Type >.

Definition at line 84 of file Constant.C.

Referenced by Constant< Type >::clone().

Here is the caller graph for this function:

Foam::dimensioned< Type > dimValue ( const scalar  x) const
virtual

Return dimensioned constant value.

Reimplemented from DataEntry< Type >.

Definition at line 91 of file Constant.C.

References Constant< Type >::dimIntegrate().

Referenced by Constant< Type >::clone().

Here is the call graph for this function:

Here is the caller graph for this function:

Foam::dimensioned< Type > dimIntegrate ( const scalar  x1,
const scalar  x2 
) const
virtual

Integrate between two values and return dimensioned type.

Reimplemented from DataEntry< Type >.

Definition at line 99 of file Constant.C.

Referenced by Constant< Type >::clone(), and Constant< Type >::dimValue().

Here is the caller graph for this function:

void writeData ( Ostream os) const
virtual

Write in dictionary format.

Reimplemented from DataEntry< Type >.

Definition at line 63 of file ConstantIO.C.

References Foam::nl, and writeData().

Referenced by Constant< Type >::clone().

Here is the call graph for this function:

Here is the caller graph for this function:

Friends And Related Function Documentation

Ostream& operator ( Ostream os,
const Constant< Type > &  cnst 
)
friend

Ostream Operator.


The documentation for this class was generated from the following files: