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

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 =0
 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 > &func)
 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() [1/2]

Function1 ( const word entryName)

Construct from entry name.

◆ Function1() [2/2]

Function1 ( const Function1< Type > &  de)

Copy constructor.

◆ ~Function1()

~Function1 ( )
virtual

Destructor.

Definition at line 49 of file Function1.C.

Member Function Documentation

◆ TypeName()

TypeName ( "Function1< Type >"  )

Runtime type information.

Declare runtime constructor selection table

◆ clone()

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

◆ New()

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

◆ name()

const Foam::word & name ( ) const

Return the name of the entry.

Definition at line 56 of file Function1.C.

Referenced by TableFile< Type >::writeData(), CSV< Type >::writeData(), Scale< Type >::writeData(), Sine< Type >::writeData(), and Square< Type >::writeData().

Here is the caller graph for this function:

◆ convertTimeBase()

void convertTimeBase ( const Time t)
virtual

Convert time.

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

Definition at line 63 of file Function1.C.

◆ value() [1/2]

Type value ( const scalar  x) const
virtual

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

Reimplemented in Square< Type >, Sine< Type >, Scale< Type >, TableBase< Type >, ramp, Polynomial< Type >, Constant< Type >, OneConstant< Type >, halfCosineRamp, linearRamp, quadraticRamp, quarterCosineRamp, quarterSineRamp, and ZeroConstant< Type >.

Definition at line 68 of file Function1.C.

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

Here is the caller graph for this function:

◆ value() [2/2]

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.

◆ integrate() [1/2]

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

Integrate between two (scalar) values.

Reimplemented in TableBase< Type >, Polynomial< Type >, Constant< Type >, OneConstant< Type >, and ZeroConstant< Type >.

Definition at line 77 of file Function1.C.

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

Here is the caller graph for this function:

◆ integrate() [2/2]

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.

◆ writeData()

void writeData ( Ostream os) const
virtual

Friends And Related Function Documentation

◆ operator

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

Ostream Operator.

Member Data Documentation

◆ name_

const word name_
protected

Name of entry.

Definition at line 76 of file Function1.H.

◆ Function1

Definition at line 88 of file Function1.H.

◆ dictionary

Definition at line 88 of file Function1.H.

◆ entryName [1/2]

const word& entryName

Definition at line 88 of file Function1.H.

◆ dict [1/2]

const word const dictionary& dict

Definition at line 88 of file Function1.H.

◆ entryName [2/2]

const word const dictionary entryName

Definition at line 88 of file Function1.H.

◆ dict [2/2]

const word const dictionary dict

Definition at line 88 of file Function1.H.


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