Cantera  3.2.0a2
Loading...
Searching...
No Matches
ctfunc Library

Generated CLib API for Cantera's Func1 class. More...

Collaboration diagram for ctfunc Library:

Detailed Description

Generated CLib API for Cantera's Func1 class.

Warning
This library is an experimental part of the Cantera API and may be changed or removed without notice.

Functions

int32_t func1_checkFunc1 (const char *func1Type, int32_t bufLen, char *buf)
 Check definition of functor object.
 
int32_t func1_newBasic (const char *func1Type, double coeff)
 Create a new basic functor object (see Basic Functors).
 
int32_t func1_newAdvanced (const char *func1Type, int32_t arrLen, const double *arr)
 Create a new advanced functor object (see Advanced Functors).
 
int32_t func1_newCompound (const char *func1Type, const int32_t f1, const int32_t f2)
 Create a new compound functor object (see Compound Functors).
 
int32_t func1_newModified (const char *func1Type, const int32_t f, double coeff)
 Create a new modified functor object (see Modified Functors).
 
int32_t func1_newSumFunction (int32_t f1, int32_t f2)
 Sum of two functions.
 
int32_t func1_newDiffFunction (int32_t f1, int32_t f2)
 Difference of two functions.
 
int32_t func1_newProdFunction (int32_t f1, int32_t f2)
 Product of two functions.
 
int32_t func1_newRatioFunction (int32_t f1, int32_t f2)
 Ratio of two functions.
 
int32_t func1_type (int32_t handle, int32_t bufLen, char *buf)
 Returns a string describing the type of the function.
 
double func1_eval (int32_t handle, double t)
 Evaluate the function.
 
int32_t func1_derivative (int32_t handle)
 Creates a derivative to the current function.
 
int32_t func1_write (int32_t handle, const char *arg, int32_t bufLen, char *buf)
 Write LaTeX string describing function.
 
int32_t func1_del (int32_t handle)
 Delete Func1 object.
 
int32_t func1_cabinetSize ()
 Return size of Func1 storage.
 

Function Documentation

◆ func1_checkFunc1()

int32_t func1_checkFunc1 ( const char *  func1Type,
int32_t  bufLen,
char *  buf 
)

Check definition of functor object.

Wraps C++ function: string checkFunc1(const string&)

Parameters
func1TypeString identifying functor type.
[in]bufLenLength of reserved array.
[out]bufReturned string value.
Returns
Actual length of string including string-terminating null byte, \0, or -1 for exception handling.

Definition at line 37 of file ctfunc.cpp.

◆ func1_newBasic()

int32_t func1_newBasic ( const char *  func1Type,
double  coeff 
)

Create a new basic functor object (see Basic Functors).

Wraps C++ constructor: shared_ptr<Func1> newFunc1(const string&, double)

Parameters
func1TypeString identifying functor type.
coeffCoefficient; definition depends on functor type.
Returns
Handle to stored Func1 object or -1 for exception handling.

Definition at line 49 of file ctfunc.cpp.

◆ func1_newAdvanced()

int32_t func1_newAdvanced ( const char *  func1Type,
int32_t  arrLen,
const double *  arr 
)

Create a new advanced functor object (see Advanced Functors).

Wraps C++ constructor: shared_ptr<Func1> newFunc1(const string&, const vector<double>&)

Parameters
func1TypeString identifying functor type.
[in]arrLenLength of vector reserved for arr.
arrParameter vector; definition depends on functor type.
Returns
Handle to stored Func1 object or -1 for exception handling.

Definition at line 59 of file ctfunc.cpp.

◆ func1_newCompound()

int32_t func1_newCompound ( const char *  func1Type,
const int32_t  f1,
const int32_t  f2 
)

Create a new compound functor object (see Compound Functors).

Wraps C++ constructor: shared_ptr<Func1> newFunc1(const string&, const shared_ptr<Func1>, const shared_ptr<Func1>)

Parameters
func1TypeString identifying functor type.
f1Integer handle to Func1 object. First Func1 object.
f2Integer handle to Func1 object. Second Func1 object.
Returns
Handle to stored Func1 object or -1 for exception handling.

Definition at line 70 of file ctfunc.cpp.

◆ func1_newModified()

int32_t func1_newModified ( const char *  func1Type,
const int32_t  f,
double  coeff 
)

Create a new modified functor object (see Modified Functors).

Wraps C++ constructor: shared_ptr<Func1> newFunc1(const string&, const shared_ptr<Func1>, double)

Parameters
func1TypeString identifying functor type.
fInteger handle to Func1 object. Func1 object.
coeffCoefficient; definition depends on functor type.
Returns
Handle to stored Func1 object or -1 for exception handling.

Definition at line 80 of file ctfunc.cpp.

◆ func1_newSumFunction()

int32_t func1_newSumFunction ( int32_t  f1,
int32_t  f2 
)

Sum of two functions.

Wraps C++ constructor: shared_ptr<Func1> newSumFunction(shared_ptr<Func1>, shared_ptr<Func1>)

Parameters
f1Integer handle to Func1 object. Undocumented.
f2Integer handle to Func1 object. Undocumented.
Returns
Handle to stored Func1 object or -1 for exception handling.

Definition at line 90 of file ctfunc.cpp.

◆ func1_newDiffFunction()

int32_t func1_newDiffFunction ( int32_t  f1,
int32_t  f2 
)

Difference of two functions.

Wraps C++ constructor: shared_ptr<Func1> newDiffFunction(shared_ptr<Func1>, shared_ptr<Func1>)

Parameters
f1Integer handle to Func1 object. Undocumented.
f2Integer handle to Func1 object. Undocumented.
Returns
Handle to stored Func1 object or -1 for exception handling.

Definition at line 100 of file ctfunc.cpp.

◆ func1_newProdFunction()

int32_t func1_newProdFunction ( int32_t  f1,
int32_t  f2 
)

Product of two functions.

Wraps C++ constructor: shared_ptr<Func1> newProdFunction(shared_ptr<Func1>, shared_ptr<Func1>)

Parameters
f1Integer handle to Func1 object. Undocumented.
f2Integer handle to Func1 object. Undocumented.
Returns
Handle to stored Func1 object or -1 for exception handling.

Definition at line 110 of file ctfunc.cpp.

◆ func1_newRatioFunction()

int32_t func1_newRatioFunction ( int32_t  f1,
int32_t  f2 
)

Ratio of two functions.

Wraps C++ constructor: shared_ptr<Func1> newRatioFunction(shared_ptr<Func1>, shared_ptr<Func1>)

Parameters
f1Integer handle to Func1 object. Undocumented.
f2Integer handle to Func1 object. Undocumented.
Returns
Handle to stored Func1 object or -1 for exception handling.

Definition at line 120 of file ctfunc.cpp.

◆ func1_type()

int32_t func1_type ( int32_t  handle,
int32_t  bufLen,
char *  buf 
)

Returns a string describing the type of the function.

Wraps C++ getter: virtual string Func1::type()

Parameters
handleHandle to queried Func1 object.
[in]bufLenLength of reserved array.
[out]bufReturned string value.
Returns
Actual length of string including string-terminating null byte, \0, or -1 for exception handling.

Definition at line 130 of file ctfunc.cpp.

◆ func1_eval()

double func1_eval ( int32_t  handle,
double  t 
)

Evaluate the function.

Wraps C++ method: virtual double Func1::eval(double)

Parameters
handleHandle to queried Func1 object.
tUndocumented.

Definition at line 142 of file ctfunc.cpp.

◆ func1_derivative()

int32_t func1_derivative ( int32_t  handle)

Creates a derivative to the current function.

Wraps C++ accessor: virtual shared_ptr<Func1> Func1::derivative()

Parameters
handleHandle to queried Func1 object.
Returns
Handle to stored Func1 object or -1 for exception handling.

Definition at line 152 of file ctfunc.cpp.

◆ func1_write()

int32_t func1_write ( int32_t  handle,
const char *  arg,
int32_t  bufLen,
char *  buf 
)

Write LaTeX string describing function.

Wraps C++ method: virtual string Func1::write(const string&)

Parameters
handleHandle to queried Func1 object.
argUndocumented.
[in]bufLenLength of reserved array.
[out]bufReturned string value.
Returns
Actual length of string including string-terminating null byte, \0, or -1 for exception handling.

Definition at line 162 of file ctfunc.cpp.

◆ func1_del()

int32_t func1_del ( int32_t  handle)

Delete Func1 object.

Wraps C++ destructor: undefined

Parameters
handleHandle to Func1 object.
Returns
Zero for success and -1 for exception handling.

Definition at line 174 of file ctfunc.cpp.

◆ func1_cabinetSize()

int32_t func1_cabinetSize ( )

Return size of Func1 storage.

Wraps C++ reserved CLib function: custom code

Returns
Size or -1 for exception handling.

Definition at line 185 of file ctfunc.cpp.