Cantera  3.2.0a5
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#include <stdint.h> // for 32-bit int32_t / 64-bit int64_t
28
29#ifdef __cplusplus
30extern "C" {
31#endif
32
33 /**
34 * @defgroup CAPIctfunc ctfunc Library
35 * Generated CLib API for %Cantera's Func1 class.
36 *
37 * @warning This library is an experimental part of the %Cantera API and
38 * may be changed or removed without notice.
39 *
40 * @ingroup CAPIindex
41 */
42
43 /**
44 * @addtogroup CAPIctfunc
45 * @{
46 */
47
48 /**
49 * Check definition of functor object.
50 *
51 * Wraps C++ function: `string checkFunc1(const string&)`
52 *
53 * @param func1Type String identifying functor type.
54 * @param[in] bufLen Length of reserved array.
55 * @param[out] buf Returned string value.
56 * @returns Actual length of string including string-terminating null byte, \0, or -1 for exception handling.
57 */
58 int32_t func1_checkFunc1(const char* func1Type, int32_t bufLen, char* buf);
59
60 /**
61 * Create a new basic functor object (see Basic Functors).
62 *
63 * Wraps C++ constructor: `shared_ptr<Func1> newFunc1(const string&, double)`
64 *
65 * @param func1Type String identifying functor type.
66 * @param coeff Coefficient; definition depends on functor type.
67 * @returns Handle to stored Func1 object or -1 for exception handling.
68 */
69 int32_t func1_newBasic(const char* func1Type, double coeff);
70
71 /**
72 * Create a new advanced functor object (see Advanced Functors).
73 *
74 * Wraps C++ constructor: `shared_ptr<Func1> newFunc1(const string&, const vector<double>&)`
75 *
76 * @param func1Type String identifying functor type.
77 * @param[in] arrLen Length of vector reserved for arr.
78 * @param arr Parameter vector; definition depends on functor type.
79 * @returns Handle to stored Func1 object or -1 for exception handling.
80 */
81 int32_t func1_newAdvanced(const char* func1Type, int32_t arrLen, const double* arr);
82
83 /**
84 * Create a new compound functor object (see Compound Functors).
85 *
86 * Wraps C++ constructor: `shared_ptr<Func1> newFunc1(const string&, const shared_ptr<Func1>, const shared_ptr<Func1>)`
87 *
88 * @param func1Type String identifying functor type.
89 * @param f1 Integer handle to Func1 object. First Func1 object.
90 * @param f2 Integer handle to Func1 object. Second Func1 object.
91 * @returns Handle to stored Func1 object or -1 for exception handling.
92 */
93 int32_t func1_newCompound(const char* func1Type, const int32_t f1, const int32_t f2);
94
95 /**
96 * Create a new modified functor object (see Modified Functors).
97 *
98 * Wraps C++ constructor: `shared_ptr<Func1> newFunc1(const string&, const shared_ptr<Func1>, double)`
99 *
100 * @param func1Type String identifying functor type.
101 * @param f Integer handle to Func1 object. Func1 object.
102 * @param coeff Coefficient; definition depends on functor type.
103 * @returns Handle to stored Func1 object or -1 for exception handling.
104 */
105 int32_t func1_newModified(const char* func1Type, const int32_t f, double coeff);
106
107 /**
108 * Sum of two functions.
109 *
110 * Wraps C++ constructor: `shared_ptr<Func1> newSumFunction(shared_ptr<Func1>, shared_ptr<Func1>)`
111 *
112 * @param f1 Integer handle to Func1 object. Undocumented.
113 * @param f2 Integer handle to Func1 object. Undocumented.
114 * @returns Handle to stored Func1 object or -1 for exception handling.
115 */
116 int32_t func1_newSumFunction(int32_t f1, int32_t f2);
117
118 /**
119 * Difference of two functions.
120 *
121 * Wraps C++ constructor: `shared_ptr<Func1> newDiffFunction(shared_ptr<Func1>, shared_ptr<Func1>)`
122 *
123 * @param f1 Integer handle to Func1 object. Undocumented.
124 * @param f2 Integer handle to Func1 object. Undocumented.
125 * @returns Handle to stored Func1 object or -1 for exception handling.
126 */
127 int32_t func1_newDiffFunction(int32_t f1, int32_t f2);
128
129 /**
130 * Product of two functions.
131 *
132 * Wraps C++ constructor: `shared_ptr<Func1> newProdFunction(shared_ptr<Func1>, shared_ptr<Func1>)`
133 *
134 * @param f1 Integer handle to Func1 object. Undocumented.
135 * @param f2 Integer handle to Func1 object. Undocumented.
136 * @returns Handle to stored Func1 object or -1 for exception handling.
137 */
138 int32_t func1_newProdFunction(int32_t f1, int32_t f2);
139
140 /**
141 * Ratio of two functions.
142 *
143 * Wraps C++ constructor: `shared_ptr<Func1> newRatioFunction(shared_ptr<Func1>, shared_ptr<Func1>)`
144 *
145 * @param f1 Integer handle to Func1 object. Undocumented.
146 * @param f2 Integer handle to Func1 object. Undocumented.
147 * @returns Handle to stored Func1 object or -1 for exception handling.
148 */
149 int32_t func1_newRatioFunction(int32_t f1, int32_t f2);
150
151 /**
152 * Returns a string describing the type of the function.
153 *
154 * Wraps C++ getter: `virtual string Func1::type()`
155 *
156 * @param handle Handle to queried Func1 object.
157 * @param[in] bufLen Length of reserved array.
158 * @param[out] buf Returned string value.
159 * @returns Actual length of string including string-terminating null byte, \0, or -1 for exception handling.
160 */
161 int32_t func1_type(int32_t handle, int32_t bufLen, char* buf);
162
163 /**
164 * Evaluate the function.
165 *
166 * Wraps C++ method: `virtual double Func1::eval(double)`
167 *
168 * @param handle Handle to queried Func1 object.
169 * @param t Undocumented.
170 */
171 double func1_eval(int32_t handle, double t);
172
173 /**
174 * Creates a derivative to the current function.
175 *
176 * Wraps C++ accessor: `virtual shared_ptr<Func1> Func1::derivative()`
177 *
178 * @param handle Handle to queried Func1 object.
179 * @returns Handle to stored Func1 object or -1 for exception handling.
180 */
181 int32_t func1_derivative(int32_t handle);
182
183 /**
184 * Write LaTeX string describing function.
185 *
186 * Wraps C++ method: `virtual string Func1::write(const string&)`
187 *
188 * @param handle Handle to queried Func1 object.
189 * @param arg Undocumented.
190 * @param[in] bufLen Length of reserved array.
191 * @param[out] buf Returned string value.
192 * @returns Actual length of string including string-terminating null byte, \0, or -1 for exception handling.
193 */
194 int32_t func1_write(int32_t handle, const char* arg, int32_t bufLen, char* buf);
195
196 /**
197 * Delete Func1 object.
198 *
199 * Wraps C++ destructor: `undefined`
200 *
201 * @param handle Handle to Func1 object.
202 * @returns Zero for success and -1 for exception handling.
203 */
204 int32_t func1_del(int32_t handle);
205
206 /**
207 * Return size of Func1 storage.
208 *
209 * Wraps C++ reserved CLib function: `custom code`
210 *
211 * @returns Size or -1 for exception handling.
212 */
213 int32_t func1_cabinetSize();
214
215 /**
216 * @}
217 */
218
219#ifdef __cplusplus
220}
221#endif
222
223#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