Cantera  3.2.0a5
Loading...
Searching...
No Matches
ctreactornet.h
Go to the documentation of this file.
1/**
2 * CTREACTORNET - Generated CLib %Cantera interface library.
3 *
4 * @file ctreactornet.h
5 *
6 * Generated CLib API for %Cantera's ReactorNet 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 CTREACTORNET_H
25#define CTREACTORNET_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 CAPIctreactornet ctreactornet Library
35 * Generated CLib API for %Cantera's ReactorNet 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 CAPIctreactornet
45 * @{
46 */
47
48 /**
49 * Create a reactor network containing one or more coupled reactors.
50 *
51 * Wraps C++ constructor: `shared_ptr<ReactorNet> newReactorNet(vector<shared_ptr<ReactorBase>>&)`
52 *
53 * @param[in] reactorsLen Length of array reserved for reactors.
54 * @param reactors Memory holding ReactorBase objects. A vector of shared pointers to the reactors to be linked together.
55 * @returns Handle to stored ReactorNet object or -1 for exception handling.
56 */
57 int32_t reactornet_new(int32_t reactorsLen, int32_t* reactors);
58
59 /**
60 * Set the initial value of the independent variable (typically time).
61 *
62 * Wraps C++ setter: `void ReactorNet::setInitialTime(double)`
63 *
64 * @param handle Handle to queried ReactorNet object.
65 * @param time Undocumented.
66 */
67 int32_t reactornet_setInitialTime(int32_t handle, double time);
68
69 /**
70 * Set the maximum integrator step.
71 *
72 * Wraps C++ setter: `void ReactorNet::setMaxTimeStep(double)`
73 *
74 * @param handle Handle to queried ReactorNet object.
75 * @param maxstep Undocumented.
76 */
77 int32_t reactornet_setMaxTimeStep(int32_t handle, double maxstep);
78
79 /**
80 * Set the relative and absolute tolerances for the integrator.
81 *
82 * Wraps C++ method: `void ReactorNet::setTolerances(double, double)`
83 *
84 * @param handle Handle to queried ReactorNet object.
85 * @param rtol Undocumented.
86 * @param atol Undocumented.
87 */
88 int32_t reactornet_setTolerances(int32_t handle, double rtol, double atol);
89
90 /**
91 * Set the relative and absolute tolerances for integrating the sensitivity equations.
92 *
93 * Wraps C++ method: `void ReactorNet::setSensitivityTolerances(double, double)`
94 *
95 * @param handle Handle to queried ReactorNet object.
96 * @param rtol Undocumented.
97 * @param atol Undocumented.
98 */
99 int32_t reactornet_setSensitivityTolerances(int32_t handle, double rtol, double atol);
100
101 /**
102 * Advance the state of all reactors in the independent variable (time or space).
103 *
104 * Wraps C++ setter: `void ReactorNet::advance(double)`
105 *
106 * @param handle Handle to queried ReactorNet object.
107 * @param t Time/distance to advance to (s or m).
108 */
109 int32_t reactornet_advance(int32_t handle, double t);
110
111 /**
112 * Advance the state of all reactors with respect to the independent variable (time or space).
113 *
114 * Wraps C++ getter: `double ReactorNet::step()`
115 *
116 * @param handle Handle to queried ReactorNet object.
117 */
118 double reactornet_step(int32_t handle);
119
120 /**
121 * Current value of the simulation time [s], for reactor networks that are solved in the time domain.
122 *
123 * Wraps C++ getter: `double ReactorNet::time()`
124 *
125 * @param handle Handle to queried ReactorNet object.
126 */
127 double reactornet_time(int32_t handle);
128
129 /**
130 * Relative tolerance.
131 *
132 * Wraps C++ getter: `double ReactorNet::rtol()`
133 *
134 * @param handle Handle to queried ReactorNet object.
135 */
136 double reactornet_rtol(int32_t handle);
137
138 /**
139 * Absolute integration tolerance.
140 *
141 * Wraps C++ getter: `double ReactorNet::atol()`
142 *
143 * @param handle Handle to queried ReactorNet object.
144 */
145 double reactornet_atol(int32_t handle);
146
147 /**
148 * Return the sensitivity of the component named *component* with respect to the *p*-th sensitivity parameter.
149 *
150 * Wraps C++ method: `double ReactorNet::sensitivity(const string&, size_t, int)`
151 *
152 * @param handle Handle to queried ReactorNet object.
153 * @param component Undocumented.
154 * @param p Undocumented.
155 * @param reactor Undocumented.
156 */
157 double reactornet_sensitivity(int32_t handle, const char* component, int32_t p, int32_t reactor);
158
159 /**
160 * Delete ReactorNet object.
161 *
162 * Wraps C++ destructor: `undefined`
163 *
164 * @param handle Handle to ReactorNet object.
165 * @returns Zero for success and -1 for exception handling.
166 */
167 int32_t reactornet_del(int32_t handle);
168
169 /**
170 * Return size of ReactorNet storage.
171 *
172 * Wraps C++ reserved CLib function: `custom code`
173 *
174 * @returns Size or -1 for exception handling.
175 */
176 int32_t reactornet_cabinetSize();
177
178 /**
179 * @}
180 */
181
182#ifdef __cplusplus
183}
184#endif
185
186#endif // CTREACTORNET_H
int32_t reactornet_advance(int32_t handle, double t)
Advance the state of all reactors in the independent variable (time or space).
int32_t reactornet_setSensitivityTolerances(int32_t handle, double rtol, double atol)
Set the relative and absolute tolerances for integrating the sensitivity equations.
double reactornet_time(int32_t handle)
Current value of the simulation time [s], for reactor networks that are solved in the time domain.
int32_t reactornet_cabinetSize()
Return size of ReactorNet storage.
int32_t reactornet_del(int32_t handle)
Delete ReactorNet object.
double reactornet_rtol(int32_t handle)
Relative tolerance.
double reactornet_step(int32_t handle)
Advance the state of all reactors with respect to the independent variable (time or space).
int32_t reactornet_setTolerances(int32_t handle, double rtol, double atol)
Set the relative and absolute tolerances for the integrator.
int32_t reactornet_setInitialTime(int32_t handle, double time)
Set the initial value of the independent variable (typically time).
double reactornet_atol(int32_t handle)
Absolute integration tolerance.
double reactornet_sensitivity(int32_t handle, const char *component, int32_t p, int32_t reactor)
Return the sensitivity of the component named component with respect to the p-th sensitivity paramete...
int32_t reactornet_setMaxTimeStep(int32_t handle, double maxstep)
Set the maximum integrator step.