Cantera  3.2.0a2
Loading...
Searching...
No Matches
interfaces/clib/include/cantera_clib/ctfunc.h
Go to the documentation of this file.
1/**
2 * CTFUNC - Generated CLib %Cantera interface library.
3 *
4 * @file ctfunc.h
5 *
6 * Generated CLib API for %Cantera's Func1 class.
7 *
8 * This library of functions is designed to encapsulate %Cantera functionality
9 * and make it available for use in languages and applications other than C++.
10 * A set of library functions is provided that are declared "extern C". All
11 * %Cantera objects are stored and referenced by integers - no pointers are
12 * passed to or from the calling application.
13 *
14 * This file was generated by sourcegen. It will be re-generated by the
15 * %Cantera build process. Do not manually edit.
16 *
17 * @warning This library is an experimental part of the %Cantera API and
18 * may be changed without notice.
19 */
20
21// This file is part of Cantera. See License.txt in the top-level directory or
22// at https://cantera.org/license.txt for license and copyright information.
23
24#ifndef CTFUNC_H
25#define CTFUNC_H
26
27#ifdef __cplusplus
28extern "C" {
29#endif
30
31 /**
32 * @defgroup CAPIctfunc ctfunc Library
33 * Generated CLib API for %Cantera's Func1 class.
34 *
35 * @warning This library is an experimental part of the %Cantera API and
36 * may be changed or removed without notice.
37 *
38 * @ingroup CAPIindex
39 */
40
41 /**
42 * @addtogroup CAPIctfunc
43 * @{
44 */
45
46 /**
47 * Check definition of functor object.
48 *
49 * Wraps C++ function: `string checkFunc1(const string&)`
50 *
51 * @param func1Type String identifying functor type.
52 * @param[in] bufLen Length of reserved array.
53 * @param[out] buf Returned string value.
54 * @returns Actual length of string including string-terminating null byte, \0, or -1 for exception handling.
55 */
56 int32_t func1_checkFunc1(const char* func1Type, int32_t bufLen, char* buf);
57
58 /**
59 * Create a new basic functor object (see Basic Functors).
60 *
61 * Wraps C++ constructor: `shared_ptr<Func1> newFunc1(const string&, double)`
62 *
63 * @param func1Type String identifying functor type.
64 * @param coeff Coefficient; definition depends on functor type.
65 * @returns Handle to stored Func1 object or -1 for exception handling.
66 */
67 int32_t func1_newBasic(const char* func1Type, double coeff);
68
69 /**
70 * Create a new advanced functor object (see Advanced Functors).
71 *
72 * Wraps C++ constructor: `shared_ptr<Func1> newFunc1(const string&, const vector<double>&)`
73 *
74 * @param func1Type String identifying functor type.
75 * @param[in] arrLen Length of vector reserved for arr.
76 * @param arr Parameter vector; definition depends on functor type.
77 * @returns Handle to stored Func1 object or -1 for exception handling.
78 */
79 int32_t func1_newAdvanced(const char* func1Type, int32_t arrLen, const double* arr);
80
81 /**
82 * Create a new compound functor object (see Compound Functors).
83 *
84 * Wraps C++ constructor: `shared_ptr<Func1> newFunc1(const string&, const shared_ptr<Func1>, const shared_ptr<Func1>)`
85 *
86 * @param func1Type String identifying functor type.
87 * @param f1 Integer handle to Func1 object. First Func1 object.
88 * @param f2 Integer handle to Func1 object. Second Func1 object.
89 * @returns Handle to stored Func1 object or -1 for exception handling.
90 */
91 int32_t func1_newCompound(const char* func1Type, const int32_t f1, const int32_t f2);
92
93 /**
94 * Create a new modified functor object (see Modified Functors).
95 *
96 * Wraps C++ constructor: `shared_ptr<Func1> newFunc1(const string&, const shared_ptr<Func1>, double)`
97 *
98 * @param func1Type String identifying functor type.
99 * @param f Integer handle to Func1 object. Func1 object.
100 * @param coeff Coefficient; definition depends on functor type.
101 * @returns Handle to stored Func1 object or -1 for exception handling.
102 */
103 int32_t func1_newModified(const char* func1Type, const int32_t f, double coeff);
104
105 /**
106 * Sum of two functions.
107 *
108 * Wraps C++ constructor: `shared_ptr<Func1> newSumFunction(shared_ptr<Func1>, shared_ptr<Func1>)`
109 *
110 * @param f1 Integer handle to Func1 object. Undocumented.
111 * @param f2 Integer handle to Func1 object. Undocumented.
112 * @returns Handle to stored Func1 object or -1 for exception handling.
113 */
114 int32_t func1_newSumFunction(int32_t f1, int32_t f2);
115
116 /**
117 * Difference of two functions.
118 *
119 * Wraps C++ constructor: `shared_ptr<Func1> newDiffFunction(shared_ptr<Func1>, shared_ptr<Func1>)`
120 *
121 * @param f1 Integer handle to Func1 object. Undocumented.
122 * @param f2 Integer handle to Func1 object. Undocumented.
123 * @returns Handle to stored Func1 object or -1 for exception handling.
124 */
125 int32_t func1_newDiffFunction(int32_t f1, int32_t f2);
126
127 /**
128 * Product of two functions.
129 *
130 * Wraps C++ constructor: `shared_ptr<Func1> newProdFunction(shared_ptr<Func1>, shared_ptr<Func1>)`
131 *
132 * @param f1 Integer handle to Func1 object. Undocumented.
133 * @param f2 Integer handle to Func1 object. Undocumented.
134 * @returns Handle to stored Func1 object or -1 for exception handling.
135 */
136 int32_t func1_newProdFunction(int32_t f1, int32_t f2);
137
138 /**
139 * Ratio of two functions.
140 *
141 * Wraps C++ constructor: `shared_ptr<Func1> newRatioFunction(shared_ptr<Func1>, shared_ptr<Func1>)`
142 *
143 * @param f1 Integer handle to Func1 object. Undocumented.
144 * @param f2 Integer handle to Func1 object. Undocumented.
145 * @returns Handle to stored Func1 object or -1 for exception handling.
146 */
147 int32_t func1_newRatioFunction(int32_t f1, int32_t f2);
148
149 /**
150 * Returns a string describing the type of the function.
151 *
152 * Wraps C++ getter: `virtual string Func1::type()`
153 *
154 * @param handle Handle to queried Func1 object.
155 * @param[in] bufLen Length of reserved array.
156 * @param[out] buf Returned string value.
157 * @returns Actual length of string including string-terminating null byte, \0, or -1 for exception handling.
158 */
159 int32_t func1_type(int32_t handle, int32_t bufLen, char* buf);
160
161 /**
162 * Evaluate the function.
163 *
164 * Wraps C++ method: `virtual double Func1::eval(double)`
165 *
166 * @param handle Handle to queried Func1 object.
167 * @param t Undocumented.
168 */
169 double func1_eval(int32_t handle, double t);
170
171 /**
172 * Creates a derivative to the current function.
173 *
174 * Wraps C++ accessor: `virtual shared_ptr<Func1> Func1::derivative()`
175 *
176 * @param handle Handle to queried Func1 object.
177 * @returns Handle to stored Func1 object or -1 for exception handling.
178 */
179 int32_t func1_derivative(int32_t handle);
180
181 /**
182 * Write LaTeX string describing function.
183 *
184 * Wraps C++ method: `virtual string Func1::write(const string&)`
185 *
186 * @param handle Handle to queried Func1 object.
187 * @param arg Undocumented.
188 * @param[in] bufLen Length of reserved array.
189 * @param[out] buf Returned string value.
190 * @returns Actual length of string including string-terminating null byte, \0, or -1 for exception handling.
191 */
192 int32_t func1_write(int32_t handle, const char* arg, int32_t bufLen, char* buf);
193
194 /**
195 * Delete Func1 object.
196 *
197 * Wraps C++ destructor: `undefined`
198 *
199 * @param handle Handle to Func1 object.
200 * @returns Zero for success and -1 for exception handling.
201 */
202 int32_t func1_del(int32_t handle);
203
204 /**
205 * Return size of Func1 storage.
206 *
207 * Wraps C++ reserved CLib function: `custom code`
208 *
209 * @returns Size or -1 for exception handling.
210 */
211 int32_t func1_cabinetSize();
212
213 /**
214 * @}
215 */
216
217#ifdef __cplusplus
218}
219#endif
220
221#endif // CTFUNC_H
int32_t func1_newDiffFunction(int32_t f1, int32_t f2)
Difference of two functions.
Definition ctfunc.cpp:100
int32_t func1_newRatioFunction(int32_t f1, int32_t f2)
Ratio of two functions.
Definition ctfunc.cpp:120
int32_t func1_type(int32_t handle, int32_t bufLen, char *buf)
Returns a string describing the type of the function.
Definition ctfunc.cpp:130
int32_t func1_checkFunc1(const char *func1Type, int32_t bufLen, char *buf)
Check definition of functor object.
Definition ctfunc.cpp:37
int32_t func1_newProdFunction(int32_t f1, int32_t f2)
Product of two functions.
Definition ctfunc.cpp:110
double func1_eval(int32_t handle, double t)
Evaluate the function.
Definition ctfunc.cpp:142
int32_t func1_newSumFunction(int32_t f1, int32_t f2)
Sum of two functions.
Definition ctfunc.cpp:90
int32_t func1_newModified(const char *func1Type, const int32_t f, double coeff)
Create a new modified functor object (see Modified Functors).
Definition ctfunc.cpp:80
int32_t func1_newAdvanced(const char *func1Type, int32_t arrLen, const double *arr)
Create a new advanced functor object (see Advanced Functors).
Definition ctfunc.cpp:59
int32_t func1_newBasic(const char *func1Type, double coeff)
Create a new basic functor object (see Basic Functors).
Definition ctfunc.cpp:49
int32_t func1_del(int32_t handle)
Delete Func1 object.
Definition ctfunc.cpp:174
int32_t func1_derivative(int32_t handle)
Creates a derivative to the current function.
Definition ctfunc.cpp:152
int32_t func1_write(int32_t handle, const char *arg, int32_t bufLen, char *buf)
Write LaTeX string describing function.
Definition ctfunc.cpp:162
int32_t func1_cabinetSize()
Return size of Func1 storage.
Definition ctfunc.cpp:185
int32_t func1_newCompound(const char *func1Type, const int32_t f1, const int32_t f2)
Create a new compound functor object (see Compound Functors).
Definition ctfunc.cpp:70