Public Member Functions | Static Public Member Functions | Public Attributes | Protected Attributes | Friends | List of all members
Function1< 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 Function1< Type >:
Inheritance graph
[legend]
Collaboration diagram for Function1< Type >:
Collaboration graph
[legend]

Public Member Functions

 TypeName ("Function1") declareRunTimeSelectionTable(autoPtr
 Runtime type information. More...
 
 Function1 (const word &entryName)
 Construct from entry name. More...
 
 Function1 (const Function1< Type > &de)
 Copy constructor. More...
 
virtual tmp< Function1< Type > > clone () const
 Construct and return a clone. More...
 
virtual ~Function1 ()
 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 void writeData (Ostream &os) const
 Write in dictionary format. More...
 
- Public Member Functions inherited from refCount
int count () const
 Return the current reference count. More...
 
bool unique () const
 Return true if the reference count is 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< Function1< Type > > New (const word &entryName, const dictionary &dict)
 Selector. More...
 

Public Attributes

 Function1
 
 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 Function1< Type > &de)
 Ostream Operator. More...
 

Additional Inherited Members

- Protected Member Functions inherited from refCount
 refCount ()
 Construct null initializing count to 0. More...
 

Detailed Description

template<class Type>
class Foam::Function1< 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 53 of file Function1.H.

Constructor & Destructor Documentation

Function1 ( const word entryName)

Construct from entry name.

Function1 ( const Function1< Type > &  de)

Copy constructor.

~Function1 ( )
virtual

Destructor.

Definition at line 49 of file Function1.C.

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

Here is the caller graph for this function:

Member Function Documentation

TypeName ( "Function1< Type >"  )

Runtime type information.

Declare runtime constructor selection table

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

Construct and return a clone.

Reimplemented in Square< Type >, Sine< Type >, CSV< Type >, TableFile< Type >, Polynomial< Type >, Constant< Type >, and Table< Type >.

Definition at line 107 of file Function1.H.

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

Selector.

Definition at line 32 of file Function1New.C.

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

Referenced by Function1< Foam::Vector >::clone(), 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 56 of file Function1.C.

References TableBase< Type >::name_.

Referenced by Function1< Foam::Vector >::clone(), TableFile< Type >::writeData(), CSV< Type >::writeData(), Sine< Type >::writeData(), and Square< Type >::writeData().

Here is the caller graph for this function:

void convertTimeBase ( const Time t)
virtual

Convert time.

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

Definition at line 63 of file Function1.C.

Referenced by Function1< 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 Square< Type >, Sine< Type >, TableBase< Type >, Polynomial< Type >, and Constant< Type >.

Definition at line 68 of file Function1.C.

References NotImplemented, and Foam::Zero.

Referenced by Function1< Foam::Vector >::clone(), and Function1< 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 87 of file Function1.C.

References fld(), forAll, Function1< Type >::integrate(), tmp< T >::ref(), 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 >, Polynomial< Type >, and Constant< Type >.

Definition at line 77 of file Function1.C.

References NotImplemented, Function1< Type >::value(), and Foam::Zero.

Referenced by Function1< Foam::Vector >::clone(), and Function1< 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 104 of file Function1.C.

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

Here is the call graph for this function:

void writeData ( Ostream os) const
virtual

Friends And Related Function Documentation

Ostream& operator ( Ostream os,
const Function1< Type > &  de 
)
friend

Ostream Operator.

Member Data Documentation

const word name_
protected

Name of entry.

Definition at line 76 of file Function1.H.

Definition at line 88 of file Function1.H.

Definition at line 88 of file Function1.H.

const word& entryName

Definition at line 88 of file Function1.H.

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

const word const dictionary& dict

Definition at line 88 of file Function1.H.

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

const word const dictionary entryName

Definition at line 88 of file Function1.H.

const word const dictionary dict

Definition at line 88 of file Function1.H.


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