Public Member Functions | Static Public Member Functions | Public Attributes | Protected Attributes | Friends | List of all members
DataEntry< Type > Class Template Reference

Top level data entry class for use in dictionaries. Provides a mechanism to specify a variable as a certain type, e.g. constant or table, and provide functions to return the (interpolated) value, and integral between limits. More...

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

Public Member Functions

 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 tmp< DataEntry< Type > > clone () const
 Construct and return a clone. 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 Type value (const scalar x) const
 Return value as a function of (scalar) independent variable. More...
 
virtual tmp< Field< Type > > value (const scalarField &x) const
 Return value as a function of (scalar) independent variable. More...
 
virtual Type integrate (const scalar x1, const scalar x2) const
 Integrate between two (scalar) values. More...
 
virtual tmp< Field< Type > > integrate (const scalarField &x1, const scalarField &x2) const
 Integrate between two (scalar) values. More...
 
virtual dimensioned< Type > dimValue (const scalar x) const
 Return dimensioned type. More...
 
virtual tmp< Field< dimensioned< Type > > > dimValue (const scalarField &x) const
 Return dimensioned type as a function of (scalar) More...
 
virtual dimensioned< Type > dimIntegrate (const scalar x1, const scalar x2) const
 Integrate between two scalars and return a dimensioned type. 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...
 
virtual void writeData (Ostream &os) const
 Write in dictionary format. 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...
 

Static Public Member Functions

static autoPtr< DataEntry< Type > > New (const word &entryName, const dictionary &dict)
 Selector. More...
 

Public Attributes

 DataEntry
 
 dictionary
 
const wordentryName
 
const word const dictionarydict
 
const word const dictionary entryName
 
const word const dictionary dict
 

Protected Attributes

const word name_
 Name of entry. More...
 

Friends

Ostreamoperator (Ostream &os, const DataEntry< Type > &de)
 Ostream Operator. More...
 

Detailed Description

template<class Type>
class Foam::DataEntry< Type >

Top level data entry class for use in dictionaries. Provides a mechanism to specify a variable as a certain type, e.g. constant or table, and provide functions to return the (interpolated) value, and integral between limits.

Source files

Definition at line 52 of file DataEntry.H.

Constructor & Destructor Documentation

DataEntry ( const word entryName)

Construct from entry name.

DataEntry ( const DataEntry< Type > &  de)

Copy constructor.

~DataEntry ( )
virtual

Destructor.

Definition at line 50 of file DataEntry.C.

Referenced by DataEntry< Foam::Vector >::clone().

Here is the caller graph for this function:

Member Function Documentation

TypeName ( "DataEntry< Type >"  )

Runtime type information.

Declare runtime constructor selection table

virtual tmp<DataEntry<Type> > clone ( ) const
inlinevirtual

Construct and return a clone.

Reimplemented in CSV< Type >, PolynomialEntry< Type >, TableFile< Type >, CompatibilityConstant< Type >, Constant< Type >, and Table< Type >.

Definition at line 112 of file DataEntry.H.

Foam::autoPtr< Foam::DataEntry< Type > > New ( const word entryName,
const dictionary dict 
)
static

Selector.

Definition at line 32 of file DataEntryNew.C.

References dict, Foam::exit(), Foam::FatalError, FatalErrorIn, dictionary::lookup(), and Foam::nl.

Referenced by DataEntry< Foam::Vector >::clone(), fanFvPatchField< Type >::fanFvPatchField(), and setTimeStepFunctionObject::read().

Here is the call graph for this function:

Here is the caller graph for this function:

const Foam::word & name ( ) const

Return the name of the entry.

Definition at line 57 of file DataEntry.C.

References TableBase< Type >::name_.

Referenced by DataEntry< Foam::Vector >::clone().

Here is the caller graph for this function:

void convertTimeBase ( const Time t)
virtual

Convert time.

Reimplemented in TableBase< Type >, and PolynomialEntry< Type >.

Definition at line 64 of file DataEntry.C.

Referenced by DataEntry< Foam::Vector >::clone().

Here is the caller graph for this function:

Type value ( const scalar  x) const
virtual

Return value as a function of (scalar) independent variable.

Reimplemented in TableBase< Type >, PolynomialEntry< Type >, CompatibilityConstant< Type >, and Constant< Type >.

Definition at line 71 of file DataEntry.C.

References notImplemented.

Referenced by DataEntry< Foam::Vector >::clone(), and DataEntry< Type >::integrate().

Here is the caller graph for this function:

Foam::tmp< Foam::Field< Type > > value ( const scalarField x) const
virtual

Return value as a function of (scalar) independent variable.

Definition at line 97 of file DataEntry.C.

References fld(), forAll, DataEntry< Type >::integrate(), List< T >::size(), and TableBase< Type >::value().

Here is the call graph for this function:

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

Integrate between two (scalar) values.

Reimplemented in TableBase< Type >, PolynomialEntry< Type >, CompatibilityConstant< Type >, and Constant< Type >.

Definition at line 80 of file DataEntry.C.

References notImplemented, and DataEntry< Type >::value().

Referenced by DataEntry< Foam::Vector >::clone(), and DataEntry< Type >::value().

Here is the call graph for this function:

Here is the caller graph for this function:

Foam::tmp< Foam::Field< Type > > integrate ( const scalarField x1,
const scalarField x2 
) const
virtual

Integrate between two (scalar) values.

Definition at line 114 of file DataEntry.C.

References fld(), forAll, TableBase< Type >::integrate(), and List< T >::size().

Here is the call graph for this function:

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

Return dimensioned type.

Reimplemented in TableBase< Type >, PolynomialEntry< Type >, CompatibilityConstant< Type >, and Constant< Type >.

Definition at line 132 of file DataEntry.C.

References DataEntry< Type >::dimIntegrate(), Foam::dimless, and notImplemented.

Referenced by DataEntry< Foam::Vector >::clone(), and DataEntry< Type >::dimIntegrate().

Here is the call graph for this function:

Here is the caller graph for this function:

Foam::tmp< Foam::Field< Foam::dimensioned< Type > > > dimValue ( const scalarField x) const
virtual

Return dimensioned type as a function of (scalar)

Definition at line 167 of file DataEntry.C.

References DataEntry< Type >::dimIntegrate(), Foam::dimless, TableBase< Type >::dimValue(), fld(), forAll, and List< T >::size().

Here is the call graph for this function:

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

Integrate between two scalars and return a dimensioned type.

Reimplemented in TableBase< Type >, PolynomialEntry< Type >, CompatibilityConstant< Type >, and Constant< Type >.

Definition at line 146 of file DataEntry.C.

References Foam::dimless, DataEntry< Type >::dimValue(), and notImplemented.

Referenced by DataEntry< Foam::Vector >::clone(), and DataEntry< Type >::dimValue().

Here is the call graph for this function:

Here is the caller graph for this function:

Foam::tmp< Foam::Field< Foam::dimensioned< Type > > > dimIntegrate ( const scalarField x1,
const scalarField x2 
) const
virtual

Integrate between two scalar fields and return a field of.

dimensioned type

Definition at line 194 of file DataEntry.C.

References TableBase< Type >::dimIntegrate(), fld(), forAll, and List< T >::size().

Here is the call graph for this function:

void writeData ( Ostream os) const
virtual

Write in dictionary format.

Reimplemented in TableBase< Type >, CSV< Type >, PolynomialEntry< Type >, CompatibilityConstant< Type >, Constant< Type >, and TableFile< Type >.

Definition at line 50 of file DataEntryIO.C.

References Foam::type(), and Ostream::writeKeyword().

Referenced by DataEntry< Foam::Vector >::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 DataEntry< Type > &  de 
)
friend

Ostream Operator.

Member Data Documentation

const word name_
protected

Name of entry.

Definition at line 81 of file DataEntry.H.

Definition at line 93 of file DataEntry.H.

Definition at line 93 of file DataEntry.H.

const word& entryName

Definition at line 93 of file DataEntry.H.

Referenced by DataEntry< Foam::Vector >::clone().

const word const dictionary& dict

Definition at line 93 of file DataEntry.H.

Referenced by DataEntry< Foam::Vector >::clone().

const word const dictionary entryName

Definition at line 93 of file DataEntry.H.

const word const dictionary dict

Definition at line 93 of file DataEntry.H.


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