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 Function2s::unitConversions &units, const dictionary &dict),(name, units, dict))
 
 declareRunTimeSelectionTable (autoPtr, Function2, Istream,(const word &name, const Function2s::unitConversions &units, Istream &is),(name, units, is))
 
 Function2 (const word &name)
 Construct from name. More...
 
 Function2 (const Function2< Type > &f2)
 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 Function2s::unitConversions &) 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...
 
void operator= (const refCount &)=delete
 Disallow bitwise assignment. More...
 

Static Public Member Functions

static autoPtr< Function2< Type > > New (const word &name, const Function2s::unitConversions &units, const dictionary &dict)
 Select from dictionary. More...
 
static autoPtr< Function2< Type > > New (const word &name, const unitConversion &xUnits, const unitConversion &yUnits, const unitConversion &valueUnits, const dictionary &dict)
 Select from dictionary. More...
 
static autoPtr< Function2< Type > > New (const word &name, const Function2s::unitConversions &units, const word &Function2Type, Istream &is)
 Select from Istream. More...
 
static autoPtr< Function2< Type > > New (const word &name, const unitConversion &xUnits, const unitConversion &yUnits, const unitConversion &valueUnits, const word &Function2Type, Istream &is)
 Select from Istream. 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...
 
 refCount (const refCount &)=delete
 Disallow copy. More...
 

Detailed Description

template<class Type>
class Foam::Function2< Type >

Run-time selectable function of two variables.

Macros for creating standard Function2-s.

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

Source files

Definition at line 95 of file Function2.H.

Member Typedef Documentation

◆ returnType

typedef Type returnType

Definition at line 110 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 > &  f2)

Copy constructor.

Definition at line 38 of file Function2.C.

◆ ~Function2()

~Function2
virtual

Destructor.

Definition at line 66 of file Function2.C.

Member Function Documentation

◆ TypeName()

TypeName ( "Function2< Type >"  )

Runtime type information.

◆ declareRunTimeSelectionTable() [1/2]

declareRunTimeSelectionTable ( autoPtr  ,
Function2< Type >  ,
dictionary  ,
(const word &name, const Function2s::unitConversions &units, const dictionary &dict ,
(name, units, dict  
)

◆ declareRunTimeSelectionTable() [2/2]

declareRunTimeSelectionTable ( autoPtr  ,
Function2< Type >  ,
Istream  ,
(const word &name, const Function2s::unitConversions &units, Istream &is)  ,
(name, units, is)   
)

◆ clone()

◆ New() [1/4]

◆ New() [2/4]

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

Select from dictionary.

Definition at line 100 of file Function2New.C.

References dict, Foam::name(), and Foam::compressible::New().

Here is the call graph for this function:

◆ New() [3/4]

Foam::autoPtr< Foam::Function2< Type > > New ( const word name,
const Function2s::unitConversions units,
const word Function2Type,
Istream is 
)
static

Select from Istream.

Definition at line 114 of file Function2New.C.

References Foam::exit(), Foam::FatalError, FatalErrorInFunction, Foam::name(), Foam::nl, and Foam::units().

Here is the call graph for this function:

◆ New() [4/4]

Foam::autoPtr< Foam::Function2< Type > > New ( const word name,
const unitConversion xUnits,
const unitConversion yUnits,
const unitConversion valueUnits,
const word Function2Type,
Istream is 
)
static

Select from Istream.

Definition at line 157 of file Function2New.C.

References Foam::name(), and Foam::compressible::New().

Here is the call graph for this function:

◆ name()

const Foam::word & name

Return the name of the entry.

Definition at line 78 of file Function2.C.

Referenced by Foam::writeEntry().

Here is the caller graph for this function:

◆ value() [1/2]

◆ value() [2/2]

◆ write()

virtual void write ( Ostream os,
const Function2s::unitConversions  
) const
pure virtual

◆ operator=()

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

Assignment.

Definition at line 106 of file Function2.C.

References Foam::abort(), f(), Foam::FatalError, and FatalErrorInFunction.

Here is the call graph for this function:

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 105 of file Function2.H.

Referenced by UniformTable< Type >::UniformTable().


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