Function1< Type > Class Template Referenceabstract

Run-time selectable general function of one variable. More...

Inheritance diagram for Function1< Type >:
Collaboration diagram for Function1< Type >:

Public Types

typedef Type returnType
 

Public Member Functions

 TypeName ("Function1")
 Runtime type information. More...
 
 declareRunTimeSelectionTable (autoPtr, Function1, dictionary,(const word &name, const dictionary &dict),(name, dict))
 Declare runtime constructor selection table. More...
 
 Function1 (const word &name)
 Construct from name. More...
 
 Function1 (const Function1< Type > &f1)
 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 Type value (const scalar x) const =0
 Return value as a function of scalar x. More...
 
virtual tmp< Field< Type > > value (const scalarField &x) const =0
 Return value as a function of a scalar field x. More...
 
virtual Type integral (const scalar x1, const scalar x2) const =0
 Integrate between two scalars. More...
 
virtual tmp< Field< Type > > integral (const scalarField &x1, const scalarField &x2) const =0
 Integrate between two scalar fields. More...
 
virtual void write (Ostream &os) const =0
 Write data to dictionary stream. More...
 
void operator= (const Function1< Type > &)
 Assignment. 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 &name, const dictionary &dict)
 Selector. More...
 

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 initialising count to 0. More...
 

Detailed Description

template<class Type>
class Foam::Function1< Type >

Run-time selectable general function of one variable.

with many options provided from simple constant values to complex functions, interpolated tabulated data etc. etc.

Source files

Definition at line 52 of file Function1.H.

Member Typedef Documentation

◆ returnType

typedef Type returnType

Definition at line 75 of file Function1.H.

Constructor & Destructor Documentation

◆ Function1() [1/2]

Function1 ( const word name)

Construct from name.

Definition at line 32 of file Function1.C.

◆ Function1() [2/2]

Function1 ( const Function1< Type > &  f1)

Copy constructor.

Definition at line 39 of file Function1.C.

◆ ~Function1()

~Function1 ( )
virtual

Destructor.

Definition at line 70 of file Function1.C.

Member Function Documentation

◆ TypeName()

TypeName ( "Function1< Type >"  )

Runtime type information.

◆ declareRunTimeSelectionTable()

declareRunTimeSelectionTable ( autoPtr  ,
Function1< Type >  ,
dictionary  ,
(const word &name, const dictionary &dict ,
(name, dict  
)

Declare runtime constructor selection table.

◆ clone()

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

◆ New()

◆ name()

const Foam::word & name ( ) const

Return the name of the entry.

Definition at line 82 of file Function1.C.

Referenced by Foam::evaluate(), and Foam::writeEntry().

Here is the caller graph for this function:

◆ value() [1/2]

virtual Type value ( const scalar  x) const
pure virtual

Return value as a function of scalar x.

Implemented in Table< Type >, Table< scalar >, Scale< Type >, FieldFunction1< Type, Function1Type >, FieldFunction1< scalar, NonUniformTable< scalar > >, FieldFunction1< Type, Constant< Type > >, FieldFunction1< Type, Scale< Type > >, FieldFunction1< scalar, NSRDS2 >, FieldFunction1< scalar, NSRDS3 >, FieldFunction1< Type, UniformTable< Type > >, FieldFunction1< scalar, quarterCosineRamp >, FieldFunction1< scalar, NSRDS0 >, FieldFunction1< Type, NonUniformTable< Type > >, FieldFunction1< Type, Table< Type > >, FieldFunction1< scalar, Function1Type >, FieldFunction1< Type, None< Type > >, FieldFunction1< scalar, NSRDS1 >, FieldFunction1< Type, OneConstant< Type > >, FieldFunction1< scalar, halfCosineRamp >, FieldFunction1< scalar, Table< scalar > >, FieldFunction1< Type, Square< Type > >, FieldFunction1< scalar, laminarBL >, FieldFunction1< scalar, quarterSineRamp >, FieldFunction1< Type, Polynomial< Type > >, FieldFunction1< scalar, linearRamp >, FieldFunction1< scalar, squarePulse >, FieldFunction1< scalar, reverseRamp >, FieldFunction1< scalar, NSRDS6 >, FieldFunction1< Type, ZeroConstant< Type > >, FieldFunction1< scalar, turbulentBL >, FieldFunction1< scalar, NSRDS7 >, FieldFunction1< scalar, NSRDS14 >, FieldFunction1< scalar, NSRDS4 >, FieldFunction1< scalar, quadraticRamp >, FieldFunction1< scalar, NSRDS5 >, FieldFunction1< Type, Sine< Type > >, Square< Type >, Ramp< Function1Type >, Ramp< reverseRamp >, Ramp< quarterSineRamp >, Ramp< halfCosineRamp >, Ramp< quarterCosineRamp >, Ramp< quadraticRamp >, Ramp< linearRamp >, Sine< Type >, linearRamp, Coded< Type >, NonUniformTable< Type >, squarePulse, NonUniformTable< scalar >, UniformTable< Type >, reverseRamp, NSRDS0, NSRDS6, NSRDS1, NSRDS14, NSRDS4, NSRDS7, NSRDS2, NSRDS3, NSRDS5, turbulentBL, Polynomial< Type >, Constant< Type >, laminarBL, OneConstant< Type >, halfCosineRamp, quadraticRamp, quarterCosineRamp, quarterSineRamp, ZeroConstant< Type >, and None< Type >.

Referenced by Foam::evaluate().

Here is the caller graph for this function:

◆ value() [2/2]

◆ integral() [1/2]

virtual Type integral ( const scalar  x1,
const scalar  x2 
) const
pure virtual

Integrate between two scalars.

Implemented in Table< Type >, Table< scalar >, Scale< Type >, FieldFunction1< Type, Function1Type >, FieldFunction1< scalar, NonUniformTable< scalar > >, FieldFunction1< Type, Constant< Type > >, FieldFunction1< Type, Scale< Type > >, FieldFunction1< scalar, NSRDS2 >, FieldFunction1< scalar, NSRDS3 >, FieldFunction1< Type, UniformTable< Type > >, FieldFunction1< scalar, quarterCosineRamp >, FieldFunction1< scalar, NSRDS0 >, FieldFunction1< Type, NonUniformTable< Type > >, FieldFunction1< Type, Table< Type > >, FieldFunction1< scalar, Function1Type >, FieldFunction1< Type, None< Type > >, FieldFunction1< scalar, NSRDS1 >, FieldFunction1< Type, OneConstant< Type > >, FieldFunction1< scalar, halfCosineRamp >, FieldFunction1< scalar, Table< scalar > >, FieldFunction1< Type, Square< Type > >, FieldFunction1< scalar, laminarBL >, FieldFunction1< scalar, quarterSineRamp >, FieldFunction1< Type, Polynomial< Type > >, FieldFunction1< scalar, linearRamp >, FieldFunction1< scalar, squarePulse >, FieldFunction1< scalar, reverseRamp >, FieldFunction1< scalar, NSRDS6 >, FieldFunction1< Type, ZeroConstant< Type > >, FieldFunction1< scalar, turbulentBL >, FieldFunction1< scalar, NSRDS7 >, FieldFunction1< scalar, NSRDS14 >, FieldFunction1< scalar, NSRDS4 >, FieldFunction1< scalar, quadraticRamp >, FieldFunction1< scalar, NSRDS5 >, FieldFunction1< Type, Sine< Type > >, Square< Type >, Sine< Type >, Coded< Type >, linearRamp, NonUniformTable< Type >, squarePulse, NonUniformTable< scalar >, NSRDS14, UniformTable< Type >, NSRDS0, NSRDS6, reverseRamp, NSRDS1, NSRDS4, NSRDS7, NSRDS2, NSRDS3, NSRDS5, turbulentBL, Polynomial< Type >, Constant< Type >, laminarBL, OneConstant< Type >, halfCosineRamp, quadraticRamp, quarterCosineRamp, quarterSineRamp, ZeroConstant< Type >, and None< Type >.

◆ integral() [2/2]

◆ write()

◆ operator=()

void operator= ( const Function1< Type > &  f)

Assignment.

Definition at line 129 of file Function1.C.

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 70 of file Function1.H.


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