Function2< Type > Class Template Referenceabstract

Run-time selectable function of two variables. More...

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

Public Types

typedef Type returnType
 

Public Member Functions

 TypeName ("Function2")
 Runtime type information. More...
 
 declareRunTimeSelectionTable (autoPtr, Function2, dictionary,(const word &name, const dictionary &dict),(name, dict))
 Declare runtime constructor selection table. More...
 
 Function2 (const word &name)
 Construct from name. More...
 
 Function2 (const Function2< Type > &f1)
 Copy constructor. More...
 
virtual tmp< Function2< Type > > clone () const =0
 Construct and return a clone. More...
 
virtual ~Function2 ()
 Destructor. More...
 
const wordname () const
 Return the name of the entry. More...
 
virtual Type value (const scalar x, const scalar y) const =0
 Return value as a function of two scalars. More...
 
virtual tmp< Field< Type > > value (const scalarField &x, const scalarField &y) const =0
 Return value as a function of two scalar fields. More...
 
virtual void write (Ostream &os) const =0
 Write in dictionary format. More...
 
void operator= (const Function2< 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< Function2< Type > > New (const word &name, const dictionary &dict)
 Selector. More...
 

Protected Attributes

const word name_
 Name of entry. More...
 

Friends

Ostreamoperator (Ostream &os, const Function2< 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::Function2< Type >

Run-time selectable function of two variables.

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

Source files

Definition at line 52 of file Function2.H.

Member Typedef Documentation

◆ returnType

typedef Type returnType

Definition at line 75 of file Function2.H.

Constructor & Destructor Documentation

◆ Function2() [1/2]

Function2 ( const word name)

Construct from name.

Definition at line 31 of file Function2.C.

◆ Function2() [2/2]

Function2 ( const Function2< Type > &  f1)

Copy constructor.

Definition at line 38 of file Function2.C.

◆ ~Function2()

~Function2 ( )
virtual

Destructor.

Definition at line 69 of file Function2.C.

Member Function Documentation

◆ TypeName()

TypeName ( "Function2< Type >"  )

Runtime type information.

◆ declareRunTimeSelectionTable()

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

Declare runtime constructor selection table.

◆ clone()

◆ New()

Foam::autoPtr< Foam::Function2< Type > > New ( const word name,
const dictionary dict 
)
static

Selector.

Definition at line 32 of file Function2New.C.

◆ name()

const Foam::word & name ( ) const

Return the name of the entry.

Definition at line 81 of file Function2.C.

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

Here is the caller graph for this function:

◆ value() [1/2]

◆ value() [2/2]

◆ write()

virtual void write ( Ostream os) const
pure virtual

Write in dictionary format.

Implemented in UniformTable< Type >, UniformTable< scalar >, Coded< Type >, Constant< Type >, APIdiffCoef, Scale< Type >, OneConstant< Type >, ZeroConstant< Type >, and None< Type >.

Referenced by Foam::writeEntry().

Here is the caller graph for this function:

◆ operator=()

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

Assignment.

Definition at line 109 of file Function2.C.

Friends And Related Function Documentation

◆ operator

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

Ostream Operator.

Member Data Documentation

◆ name_

const word name_
protected

Name of entry.

Definition at line 70 of file Function2.H.


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