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