31typedef Cabinet<ReactorNet> ReactorNetCabinet;
32template<> ReactorNetCabinet* ReactorNetCabinet::s_storage = 0;
34typedef Cabinet<ReactorBase> ReactorBaseCabinet;
35template<> ReactorBaseCabinet* ReactorBaseCabinet::s_storage;
41 int32_t reactornet_new(int32_t reactorsLen, int32_t* reactors)
45 vector<shared_ptr<ReactorBase>> reactors_;
46 for (
int i = 0; i < reactorsLen; i++) {
47 reactors_.push_back(ReactorBaseCabinet::at(reactors[i]));
59 ReactorNetCabinet::at(handle)->setInitialTime(time);
70 ReactorNetCabinet::at(handle)->setMaxTimeStep(maxstep);
81 ReactorNetCabinet::at(handle)->setTolerances(rtol, atol);
92 ReactorNetCabinet::at(handle)->setSensitivityTolerances(rtol, atol);
103 ReactorNetCabinet::at(handle)->advance(t);
114 return ReactorNetCabinet::at(handle)->step();
124 return ReactorNetCabinet::at(handle)->time();
134 return ReactorNetCabinet::at(handle)->rtol();
144 return ReactorNetCabinet::at(handle)->atol();
154 return ReactorNetCabinet::at(handle)->sensitivity(component, p, reactor);
164 ReactorNetCabinet::del(handle);
176 return ReactorNetCabinet::size();
188 return ReactorNetCabinet::parent(handle);
CTREACTORNET - Generated CLib Cantera interface library.
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.
Namespace for the Cantera kernel.
shared_ptr< ReactorNet > newReactorNet(vector< shared_ptr< ReactorBase > > &reactors)
Create a reactor network containing one or more coupled reactors.
T handleAllExceptions(T ctErrorCode, T otherErrorCode)
Exception handler used at language interface boundaries.