30typedef Cabinet<Func1> Func1Cabinet;
31template<> Func1Cabinet* Func1Cabinet::s_storage = 0;
43 return int(out.size()) + 1;
53 return Func1Cabinet::add(
newFunc1(func1Type, coeff));
63 const vector<double> arr_(arr, arr + arrLen);
64 return Func1Cabinet::add(
newFunc1(func1Type, arr_));
74 return Func1Cabinet::add(
newFunc1(func1Type, Func1Cabinet::at(f1), Func1Cabinet::at(f2)));
84 return Func1Cabinet::add(
newFunc1(func1Type, Func1Cabinet::at(f), coeff));
94 return Func1Cabinet::add(
newSumFunction(Func1Cabinet::at(f1), Func1Cabinet::at(f2)));
104 return Func1Cabinet::add(
newDiffFunction(Func1Cabinet::at(f1), Func1Cabinet::at(f2)));
114 return Func1Cabinet::add(
newProdFunction(Func1Cabinet::at(f1), Func1Cabinet::at(f2)));
124 return Func1Cabinet::add(
newRatioFunction(Func1Cabinet::at(f1), Func1Cabinet::at(f2)));
130 int32_t
func1_type(int32_t handle, int32_t bufLen,
char* buf)
134 string out = Func1Cabinet::at(handle)->type();
136 return int(out.size()) + 1;
146 return Func1Cabinet::at(handle)->eval(t);
156 return Func1Cabinet::add(Func1Cabinet::at(handle)->derivative());
162 int32_t
func1_write(int32_t handle,
const char* arg, int32_t bufLen,
char* buf)
166 string out = Func1Cabinet::at(handle)->write(arg);
168 return int(out.size()) + 1;
178 Func1Cabinet::del(handle);
190 return Func1Cabinet::size();
int32_t func1_newDiffFunction(int32_t f1, int32_t f2)
Difference 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.
int32_t func1_checkFunc1(const char *func1Type, int32_t bufLen, char *buf)
Check definition of functor object.
int32_t func1_newProdFunction(int32_t f1, int32_t f2)
Product of two functions.
double func1_eval(int32_t handle, double t)
Evaluate the function.
int32_t func1_newSumFunction(int32_t f1, int32_t f2)
Sum of two functions.
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_newAdvanced(const char *func1Type, int32_t arrLen, const double *arr)
Create a new advanced functor object (see Advanced Functors).
int32_t func1_newBasic(const char *func1Type, double coeff)
Create a new basic functor object (see Basic Functors).
int32_t func1_del(int32_t handle)
Delete Func1 object.
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_cabinetSize()
Return size of Func1 storage.
int32_t func1_newCompound(const char *func1Type, const int32_t f1, const int32_t f2)
Create a new compound functor object (see Compound Functors).
size_t copyString(const string &source, char *dest, size_t length)
Copy the contents of a string into a char array of a given length.
shared_ptr< Func1 > newFunc1(const string &func1Type, double coeff)
Create a new basic functor object (see Basic Functors).
string checkFunc1(const string &func1Type)
Check definition of functor object.
shared_ptr< Func1 > newProdFunction(shared_ptr< Func1 > f1, shared_ptr< Func1 > f2)
Product of two functions.
shared_ptr< Func1 > newDiffFunction(shared_ptr< Func1 > f1, shared_ptr< Func1 > f2)
Difference of two functions.
shared_ptr< Func1 > newSumFunction(shared_ptr< Func1 > f1, shared_ptr< Func1 > f2)
Sum of two functions.
shared_ptr< Func1 > newRatioFunction(shared_ptr< Func1 > f1, shared_ptr< Func1 > f2)
Ratio of two functions.
CTFUNC - Generated CLib Cantera interface library.
Namespace for the Cantera kernel.
T handleAllExceptions(T ctErrorCode, T otherErrorCode)
Exception handler used at language interface boundaries.
Contains declarations for string manipulation functions within Cantera.