Cantera  3.2.0a2
Loading...
Searching...
No Matches
ctrdiag.h
Go to the documentation of this file.
1/**
2 * CTRDIAG - Generated CLib %Cantera interface library.
3 *
4 * @file ctrdiag.h
5 *
6 * Generated CLib API for %Cantera's ReactionPathDiagram 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 CTRDIAG_H
25#define CTRDIAG_H
26
27#ifdef __cplusplus
28extern "C" {
29#endif
30
31 /**
32 * @defgroup CAPIctrdiag ctrdiag Library
33 * Generated CLib API for %Cantera's ReactionPathDiagram 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 CAPIctrdiag
43 * @{
44 */
45
46 /**
47 * Create a new reaction path diagram.
48 *
49 * Wraps C++ constructor: `shared_ptr<ReactionPathDiagram> newReactionPathDiagram(shared_ptr<Kinetics>, const string&)`
50 *
51 * @param kin Integer handle to Kinetics object. Shared pointer to Kinetics object.
52 * @param element Element used for the calculation of net reaction rates.
53 * @returns Handle to stored ReactionPathDiagram object or -1 for exception handling.
54 */
55 int32_t rdiag_newReactionPathDiagram(int32_t kin, const char* element);
56
57 /**
58 * Boolean flag to show details.
59 *
60 * Wraps C++ variable-getter: `bool ReactionPathDiagram::show_details`
61 *
62 * @param handle Handle to queried ReactionPathDiagram object.
63 */
64 int32_t rdiag_showDetails(int handle);
65
66 /**
67 * Boolean flag to show details.
68 *
69 * Wraps C++ variable-setter: `bool ReactionPathDiagram::show_details`
70 *
71 * @param handle Handle to queried ReactionPathDiagram object.
72 * @param[in] show_details Boolean flag to show details.
73 */
74 int32_t rdiag_setShowDetails(int32_t handle, int32_t show_details);
75
76 /**
77 * Threshold for the minimum flux relative value that will be plotted.
78 *
79 * Wraps C++ variable-getter: `double ReactionPathDiagram::threshold`
80 *
81 * @param handle Handle to queried ReactionPathDiagram object.
82 */
83 double rdiag_threshold(int handle);
84
85 /**
86 * Threshold for the minimum flux relative value that will be plotted.
87 *
88 * Wraps C++ variable-setter: `double ReactionPathDiagram::threshold`
89 *
90 * @param handle Handle to queried ReactionPathDiagram object.
91 * @param[in] threshold Threshold for the minimum flux relative value that will be plotted.
92 */
93 int32_t rdiag_setThreshold(int32_t handle, double threshold);
94
95 /**
96 * Minimum relative flux for bold lines.
97 *
98 * Wraps C++ variable-getter: `double ReactionPathDiagram::bold_min`
99 *
100 * @param handle Handle to queried ReactionPathDiagram object.
101 */
102 double rdiag_boldThreshold(int handle);
103
104 /**
105 * Minimum relative flux for bold lines.
106 *
107 * Wraps C++ variable-setter: `double ReactionPathDiagram::bold_min`
108 *
109 * @param handle Handle to queried ReactionPathDiagram object.
110 * @param[in] bold_min Minimum relative flux for bold lines.
111 */
112 int32_t rdiag_setBoldThreshold(int32_t handle, double bold_min);
113
114 /**
115 * Maximum relative flux for dashed lines.
116 *
117 * Wraps C++ variable-getter: `double ReactionPathDiagram::dashed_max`
118 *
119 * @param handle Handle to queried ReactionPathDiagram object.
120 */
121 double rdiag_normalThreshold(int handle);
122
123 /**
124 * Maximum relative flux for dashed lines.
125 *
126 * Wraps C++ variable-setter: `double ReactionPathDiagram::dashed_max`
127 *
128 * @param handle Handle to queried ReactionPathDiagram object.
129 * @param[in] dashed_max Maximum relative flux for dashed lines.
130 */
131 int32_t rdiag_setNormalThreshold(int32_t handle, double dashed_max);
132
133 /**
134 * Minimum relative flux for labels.
135 *
136 * Wraps C++ variable-getter: `double ReactionPathDiagram::label_min`
137 *
138 * @param handle Handle to queried ReactionPathDiagram object.
139 */
140 double rdiag_labelThreshold(int handle);
141
142 /**
143 * Minimum relative flux for labels.
144 *
145 * Wraps C++ variable-setter: `double ReactionPathDiagram::label_min`
146 *
147 * @param handle Handle to queried ReactionPathDiagram object.
148 * @param[in] label_min Minimum relative flux for labels.
149 */
150 int32_t rdiag_setLabelThreshold(int32_t handle, double label_min);
151
152 /**
153 * Color for bold lines.
154 *
155 * Wraps C++ variable-getter: `string ReactionPathDiagram::bold_color`
156 *
157 * @param handle Handle to queried ReactionPathDiagram object.
158 * @param[in] bufLen Length of reserved array.
159 * @param[out] buf Returned string value.
160 * @returns Actual length of string including string-terminating null byte, \0, or -1 for exception handling.
161 */
162 int32_t rdiag_boldColor(int handle, int32_t bufLen, char* buf);
163
164 /**
165 * Color for bold lines.
166 *
167 * Wraps C++ variable-setter: `string ReactionPathDiagram::bold_color`
168 *
169 * @param handle Handle to queried ReactionPathDiagram object.
170 * @param[in] bold_color Color for bold lines.
171 */
172 int32_t rdiag_setBoldColor(int32_t handle, const char* bold_color);
173
174 /**
175 * Color for normal-weight lines.
176 *
177 * Wraps C++ variable-getter: `string ReactionPathDiagram::normal_color`
178 *
179 * @param handle Handle to queried ReactionPathDiagram object.
180 * @param[in] bufLen Length of reserved array.
181 * @param[out] buf Returned string value.
182 * @returns Actual length of string including string-terminating null byte, \0, or -1 for exception handling.
183 */
184 int32_t rdiag_normalColor(int handle, int32_t bufLen, char* buf);
185
186 /**
187 * Color for normal-weight lines.
188 *
189 * Wraps C++ variable-setter: `string ReactionPathDiagram::normal_color`
190 *
191 * @param handle Handle to queried ReactionPathDiagram object.
192 * @param[in] normal_color Color for normal-weight lines.
193 */
194 int32_t rdiag_setNormalColor(int32_t handle, const char* normal_color);
195
196 /**
197 * Color for dashed lines.
198 *
199 * Wraps C++ variable-getter: `string ReactionPathDiagram::dashed_color`
200 *
201 * @param handle Handle to queried ReactionPathDiagram object.
202 * @param[in] bufLen Length of reserved array.
203 * @param[out] buf Returned string value.
204 * @returns Actual length of string including string-terminating null byte, \0, or -1 for exception handling.
205 */
206 int32_t rdiag_dashedColor(int handle, int32_t bufLen, char* buf);
207
208 /**
209 * Color for dashed lines.
210 *
211 * Wraps C++ variable-setter: `string ReactionPathDiagram::dashed_color`
212 *
213 * @param handle Handle to queried ReactionPathDiagram object.
214 * @param[in] dashed_color Color for dashed lines.
215 */
216 int32_t rdiag_setDashedColor(int32_t handle, const char* dashed_color);
217
218 /**
219 * Options for the 'dot' program.
220 *
221 * Wraps C++ variable-getter: `string ReactionPathDiagram::dot_options`
222 *
223 * @param handle Handle to queried ReactionPathDiagram object.
224 * @param[in] bufLen Length of reserved array.
225 * @param[out] buf Returned string value.
226 * @returns Actual length of string including string-terminating null byte, \0, or -1 for exception handling.
227 */
228 int32_t rdiag_dotOptions(int handle, int32_t bufLen, char* buf);
229
230 /**
231 * Options for the 'dot' program.
232 *
233 * Wraps C++ variable-setter: `string ReactionPathDiagram::dot_options`
234 *
235 * @param handle Handle to queried ReactionPathDiagram object.
236 * @param[in] dot_options Options for the 'dot' program.
237 */
238 int32_t rdiag_setDotOptions(int32_t handle, const char* dot_options);
239
240 /**
241 * Reaction path diagram font.
242 *
243 * Wraps C++ variable-getter: `string ReactionPathDiagram::m_font`
244 *
245 * @param handle Handle to queried ReactionPathDiagram object.
246 * @param[in] bufLen Length of reserved array.
247 * @param[out] buf Returned string value.
248 * @returns Actual length of string including string-terminating null byte, \0, or -1 for exception handling.
249 */
250 int32_t rdiag_font(int handle, int32_t bufLen, char* buf);
251
252 /**
253 * Set name of the font used.
254 *
255 * Wraps C++ setter: `void ReactionPathDiagram::setFont(const string&)`
256 *
257 * @param handle Handle to queried ReactionPathDiagram object.
258 * @param font Undocumented.
259 */
260 int32_t rdiag_setFont(int32_t handle, const char* font);
261
262 /**
263 * The scaling factor for the fluxes.
264 *
265 * Wraps C++ variable-getter: `double ReactionPathDiagram::scale`
266 *
267 * @param handle Handle to queried ReactionPathDiagram object.
268 */
269 double rdiag_scale(int handle);
270
271 /**
272 * The scaling factor for the fluxes.
273 *
274 * Wraps C++ variable-setter: `double ReactionPathDiagram::scale`
275 *
276 * @param handle Handle to queried ReactionPathDiagram object.
277 * @param[in] scale The scaling factor for the fluxes.
278 */
279 int32_t rdiag_setScale(int32_t handle, double scale);
280
281 /**
282 * Get the way flows are drawn. Either 'NetFlow' or 'OneWayFlow'.
283 *
284 * Wraps C++ getter: `const string ReactionPathDiagram::flowType()`
285 *
286 * @param handle Handle to queried ReactionPathDiagram object.
287 * @param[in] bufLen Length of reserved array.
288 * @param[out] buf Returned string value.
289 * @returns Actual length of string including string-terminating null byte, \0, or -1 for exception handling.
290 */
291 int32_t rdiag_flowType(int32_t handle, int32_t bufLen, char* buf);
292
293 /**
294 * Get the way flows are drawn. Either 'NetFlow' or 'OneWayFlow'.
295 *
296 * Wraps C++ setter: `void ReactionPathDiagram::setFlowType(const string&)`
297 *
298 * @param handle Handle to queried ReactionPathDiagram object.
299 * @param fType Undocumented.
300 */
301 int32_t rdiag_setFlowType(int32_t handle, const char* fType);
302
303 /**
304 * The arrow width. If < 0, then scale with flux value.
305 *
306 * Wraps C++ variable-getter: `double ReactionPathDiagram::arrow_width`
307 *
308 * @param handle Handle to queried ReactionPathDiagram object.
309 */
310 double rdiag_arrowWidth(int handle);
311
312 /**
313 * The arrow width. If < 0, then scale with flux value.
314 *
315 * Wraps C++ variable-setter: `double ReactionPathDiagram::arrow_width`
316 *
317 * @param handle Handle to queried ReactionPathDiagram object.
318 * @param[in] arrow_width The arrow width. If < 0, then scale with flux value.
319 */
320 int32_t rdiag_setArrowWidth(int32_t handle, double arrow_width);
321
322 /**
323 * Reaction path diagram title.
324 *
325 * Wraps C++ variable-getter: `string ReactionPathDiagram::title`
326 *
327 * @param handle Handle to queried ReactionPathDiagram object.
328 * @param[in] bufLen Length of reserved array.
329 * @param[out] buf Returned string value.
330 * @returns Actual length of string including string-terminating null byte, \0, or -1 for exception handling.
331 */
332 int32_t rdiag_title(int handle, int32_t bufLen, char* buf);
333
334 /**
335 * Reaction path diagram title.
336 *
337 * Wraps C++ variable-setter: `string ReactionPathDiagram::title`
338 *
339 * @param handle Handle to queried ReactionPathDiagram object.
340 * @param[in] title Reaction path diagram title.
341 */
342 int32_t rdiag_setTitle(int32_t handle, const char* title);
343
344 /**
345 * Add fluxes from other ReactionPathDiagram to this diagram.
346 *
347 * Wraps C++ setter: `void ReactionPathDiagram::add(shared_ptr<ReactionPathDiagram>)`
348 *
349 * @param handle Handle to queried ReactionPathDiagram object.
350 * @param d Integer handle to ReactionPathDiagram object. Undocumented.
351 */
352 int32_t rdiag_add(int32_t handle, int32_t d);
353
354 /**
355 * Include only species and fluxes that are directly connected to a species.
356 *
357 * Wraps C++ setter: `void ReactionPathDiagram::displayOnly(size_t)`
358 *
359 * @param handle Handle to queried ReactionPathDiagram object.
360 * @param k Undocumented.
361 */
362 int32_t rdiag_displayOnly(int32_t handle, int32_t k);
363
364 /**
365 * Export string in
366 *
367 * Wraps C++ getter: `string ReactionPathDiagram::getDot()`
368 *
369 * @param handle Handle to queried ReactionPathDiagram object.
370 * @param[in] bufLen Length of reserved array.
371 * @param[out] buf Returned string value.
372 * @returns Actual length of string including string-terminating null byte, \0, or -1 for exception handling.
373 */
374 int32_t rdiag_getDot(int32_t handle, int32_t bufLen, char* buf);
375
376 /**
377 * Get a (roughly) human-readable representation of the reaction path diagram.
378 *
379 * Wraps C++ getter: `string ReactionPathDiagram::getData()`
380 *
381 * @param handle Handle to queried ReactionPathDiagram object.
382 * @param[in] bufLen Length of reserved array.
383 * @param[out] buf Returned string value.
384 * @returns Actual length of string including string-terminating null byte, \0, or -1 for exception handling.
385 */
386 int32_t rdiag_getData(int32_t handle, int32_t bufLen, char* buf);
387
388 /**
389 * Build the reaction path diagram.
390 *
391 * Wraps C++ method: `void ReactionPathDiagram::build()`
392 *
393 * @param handle Handle to queried ReactionPathDiagram object.
394 */
395 int32_t rdiag_build(int32_t handle);
396
397 /**
398 * Get logging messages generated while building the reaction path diagram.
399 *
400 * Wraps C++ getter: `string ReactionPathDiagram::getLog()`
401 *
402 * @param handle Handle to queried ReactionPathDiagram object.
403 * @param[in] bufLen Length of reserved array.
404 * @param[out] buf Returned string value.
405 * @returns Actual length of string including string-terminating null byte, \0, or -1 for exception handling.
406 */
407 int32_t rdiag_getLog(int32_t handle, int32_t bufLen, char* buf);
408
409 /**
410 * Undocumented.
411 *
412 * Wraps C++ method: `void ReactionPathDiagram::findMajorPaths(double, size_t, double*)`
413 *
414 * @param handle Handle to queried ReactionPathDiagram object.
415 * @param threshold Undocumented.
416 * @param lda Undocumented.
417 * @param[in] aLen Length of array reserved for a.
418 * @param a Undocumented.
419 */
420 int32_t rdiag_findMajor(int32_t handle, double threshold, int32_t lda, int32_t aLen, double* a);
421
422 /**
423 * Delete ReactionPathDiagram object.
424 *
425 * Wraps C++ destructor: `undefined`
426 *
427 * @param handle Handle to ReactionPathDiagram object.
428 * @returns Zero for success and -1 for exception handling.
429 */
430 int32_t rdiag_del(int32_t handle);
431
432 /**
433 * Return size of ReactionPathDiagram storage.
434 *
435 * Wraps C++ reserved CLib function: `custom code`
436 *
437 * @returns Size or -1 for exception handling.
438 */
439 int32_t rdiag_cabinetSize();
440
441 /**
442 * Return handle to parent of ReactionPathDiagram object.
443 *
444 * Wraps C++ reserved CLib function: `custom code`
445 *
446 * @param handle Handle to queried ReactionPathDiagram object.
447 * @returns Parent handle or -1 for exception handling.
448 */
449 int32_t rdiag_parentHandle(int32_t handle);
450
451 /**
452 * @}
453 */
454
455#ifdef __cplusplus
456}
457#endif
458
459#endif // CTRDIAG_H
int32_t rdiag_findMajor(int32_t handle, double threshold, int32_t lda, int32_t aLen, double *a)
Undocumented.
Definition ctrdiag.cpp:431
int32_t rdiag_newReactionPathDiagram(int32_t kin, const char *element)
Create a new reaction path diagram.
Definition ctrdiag.cpp:42
int32_t rdiag_add(int32_t handle, int32_t d)
Add fluxes from other ReactionPathDiagram to this diagram.
Definition ctrdiag.cpp:362
int32_t rdiag_setDashedColor(int32_t handle, const char *dashed_color)
Color for dashed lines.
Definition ctrdiag.cpp:217
double rdiag_normalThreshold(int handle)
Maximum relative flux for dashed lines.
Definition ctrdiag.cpp:117
int32_t rdiag_setTitle(int32_t handle, const char *title)
Reaction path diagram title.
Definition ctrdiag.cpp:351
int32_t rdiag_del(int32_t handle)
Delete ReactionPathDiagram object.
Definition ctrdiag.cpp:442
int32_t rdiag_dotOptions(int handle, int32_t bufLen, char *buf)
Options for the 'dot' program.
Definition ctrdiag.cpp:228
int32_t rdiag_build(int32_t handle)
Build the reaction path diagram.
Definition ctrdiag.cpp:408
int32_t rdiag_setDotOptions(int32_t handle, const char *dot_options)
Options for the 'dot' program.
Definition ctrdiag.cpp:240
int32_t rdiag_getDot(int32_t handle, int32_t bufLen, char *buf)
Export string in.
Definition ctrdiag.cpp:384
int32_t rdiag_setBoldColor(int32_t handle, const char *bold_color)
Color for bold lines.
Definition ctrdiag.cpp:171
int32_t rdiag_setBoldThreshold(int32_t handle, double bold_min)
Minimum relative flux for bold lines.
Definition ctrdiag.cpp:106
double rdiag_arrowWidth(int handle)
The arrow width.
Definition ctrdiag.cpp:318
int32_t rdiag_parentHandle(int32_t handle)
Return handle to parent of ReactionPathDiagram object.
Definition ctrdiag.cpp:465
int32_t rdiag_setNormalThreshold(int32_t handle, double dashed_max)
Maximum relative flux for dashed lines.
Definition ctrdiag.cpp:127
int32_t rdiag_showDetails(int handle)
Boolean flag to show details.
Definition ctrdiag.cpp:52
int32_t rdiag_cabinetSize()
Return size of ReactionPathDiagram storage.
Definition ctrdiag.cpp:453
int32_t rdiag_getData(int32_t handle, int32_t bufLen, char *buf)
Get a (roughly) human-readable representation of the reaction path diagram.
Definition ctrdiag.cpp:396
int32_t rdiag_dashedColor(int handle, int32_t bufLen, char *buf)
Color for dashed lines.
Definition ctrdiag.cpp:205
int32_t rdiag_setShowDetails(int32_t handle, int32_t show_details)
Boolean flag to show details.
Definition ctrdiag.cpp:63
int32_t rdiag_title(int handle, int32_t bufLen, char *buf)
Reaction path diagram title.
Definition ctrdiag.cpp:339
double rdiag_labelThreshold(int handle)
Minimum relative flux for labels.
Definition ctrdiag.cpp:138
int32_t rdiag_setThreshold(int32_t handle, double threshold)
Threshold for the minimum flux relative value that will be plotted.
Definition ctrdiag.cpp:85
int32_t rdiag_flowType(int32_t handle, int32_t bufLen, char *buf)
Get the way flows are drawn.
Definition ctrdiag.cpp:295
int32_t rdiag_setArrowWidth(int32_t handle, double arrow_width)
The arrow width.
Definition ctrdiag.cpp:328
double rdiag_threshold(int handle)
Threshold for the minimum flux relative value that will be plotted.
Definition ctrdiag.cpp:75
int32_t rdiag_displayOnly(int32_t handle, int32_t k)
Include only species and fluxes that are directly connected to a species.
Definition ctrdiag.cpp:373
int32_t rdiag_boldColor(int handle, int32_t bufLen, char *buf)
Color for bold lines.
Definition ctrdiag.cpp:159
int32_t rdiag_getLog(int32_t handle, int32_t bufLen, char *buf)
Get logging messages generated while building the reaction path diagram.
Definition ctrdiag.cpp:419
double rdiag_boldThreshold(int handle)
Minimum relative flux for bold lines.
Definition ctrdiag.cpp:96
int32_t rdiag_setFlowType(int32_t handle, const char *fType)
Get the way flows are drawn.
Definition ctrdiag.cpp:307
int32_t rdiag_setNormalColor(int32_t handle, const char *normal_color)
Color for normal-weight lines.
Definition ctrdiag.cpp:194
int32_t rdiag_normalColor(int handle, int32_t bufLen, char *buf)
Color for normal-weight lines.
Definition ctrdiag.cpp:182
int32_t rdiag_font(int handle, int32_t bufLen, char *buf)
Reaction path diagram font.
Definition ctrdiag.cpp:251
double rdiag_scale(int handle)
The scaling factor for the fluxes.
Definition ctrdiag.cpp:274
int32_t rdiag_setScale(int32_t handle, double scale)
The scaling factor for the fluxes.
Definition ctrdiag.cpp:284
int32_t rdiag_setFont(int32_t handle, const char *font)
Set name of the font used.
Definition ctrdiag.cpp:263
int32_t rdiag_setLabelThreshold(int32_t handle, double label_min)
Minimum relative flux for labels.
Definition ctrdiag.cpp:148