Cantera  3.2.0a5
Loading...
Searching...
No Matches
ctdomain.cpp
Go to the documentation of this file.
1/**
2 * CTDOMAIN - Generated CLib %Cantera interface library.
3 *
4 * @file ctdomain.cpp
5 *
6 * Generated CLib API for Cantera's Domain1D class.
7 *
8 * This file was generated by sourcegen. It will be re-generated by the
9 * %Cantera build process. Do not manually edit.
10 *
11 * @warning This module is an experimental part of the %Cantera API and
12 * may be changed without notice.
13 */
14
15// This file is part of Cantera. See License.txt in the top-level directory or
16// at https://cantera.org/license.txt for license and copyright information.
17
18#include "clib_utils.h"
20
23#include "cantera/oneD/Flow1D.h"
27
28using namespace Cantera;
29
30//! @cond
31//! Cabinet type definitions will be ignored by Doxygen
32
33// Define Cabinet<Domain1D> (single-instance object)
34typedef Cabinet<Domain1D> Domain1DCabinet;
35template<> Domain1DCabinet* Domain1DCabinet::s_storage = 0; // initialized here
36
37typedef Cabinet<Flow1D> Flow1DCabinet;
38template<> Flow1DCabinet* Flow1DCabinet::s_storage; // initialized elsewhere
39
40typedef Cabinet<Solution> SolutionCabinet;
41template<> SolutionCabinet* SolutionCabinet::s_storage; // initialized elsewhere
42
43typedef Cabinet<Boundary1D> Boundary1DCabinet;
44template<> Boundary1DCabinet* Boundary1DCabinet::s_storage; // initialized elsewhere
45
46typedef Cabinet<Transport> TransportCabinet;
47template<> TransportCabinet* TransportCabinet::s_storage; // initialized elsewhere
48
49//! @endcond
50
51extern "C" {
52
53 int32_t domain_newFlow1D(const char* domainType, int32_t solution, const char* id)
54 {
55 // constructor: shared_ptr<Flow1D> newFlow1D(const string&, shared_ptr<Solution>, const string&)
56 try {
57 return Domain1DCabinet::add(newFlow1D(domainType, SolutionCabinet::at(solution), id));
58 } catch (...) {
59 return handleAllExceptions(-2, ERR);
60 }
61 }
62
63 int32_t domain_newBoundary1D(const char* domainType, int32_t solution, const char* id)
64 {
65 // constructor: shared_ptr<Boundary1D> newBoundary1D(const string&, shared_ptr<Solution>, const string&)
66 try {
67 return Domain1DCabinet::add(newBoundary1D(domainType, SolutionCabinet::at(solution), id));
68 } catch (...) {
69 return handleAllExceptions(-2, ERR);
70 }
71 }
72
73 int32_t domain_type(int32_t handle, int32_t bufLen, char* buf)
74 {
75 // getter: string Domain1D::type()
76 try {
77 string out = Domain1DCabinet::at(handle)->type();
78 copyString(out, buf, bufLen);
79 return int(out.size()) + 1;
80 } catch (...) {
81 return handleAllExceptions(-1, ERR);
82 }
83 }
84
85 int32_t domain_domainIndex(int32_t handle)
86 {
87 // size getter: size_t Domain1D::domainIndex()
88 try {
89 return static_cast<int32_t>(Domain1DCabinet::at(handle)->domainIndex());
90 } catch (...) {
91 return handleAllExceptions(ERR, ERR);
92 }
93 }
94
95 int32_t domain_index(int32_t handle, int32_t n, int32_t j)
96 {
97 // size getter: size_t Domain1D::index(size_t, size_t)
98 try {
99 return static_cast<int32_t>(Domain1DCabinet::at(handle)->index(n, j));
100 } catch (...) {
101 return handleAllExceptions(ERR, ERR);
102 }
103 }
104
105 int32_t domain_nComponents(int32_t handle)
106 {
107 // size getter: size_t Domain1D::nComponents()
108 try {
109 return static_cast<int32_t>(Domain1DCabinet::at(handle)->nComponents());
110 } catch (...) {
111 return handleAllExceptions(ERR, ERR);
112 }
113 }
114
115 int32_t domain_nPoints(int32_t handle)
116 {
117 // size getter: size_t Domain1D::nPoints()
118 try {
119 return static_cast<int32_t>(Domain1DCabinet::at(handle)->nPoints());
120 } catch (...) {
121 return handleAllExceptions(ERR, ERR);
122 }
123 }
124
125 int32_t domain_componentName(int32_t handle, int32_t n, int32_t bufLen, char* buf)
126 {
127 // method: virtual string Domain1D::componentName(size_t)
128 try {
129 string out = Domain1DCabinet::at(handle)->componentName(n);
130 copyString(out, buf, bufLen);
131 return int(out.size()) + 1;
132 } catch (...) {
133 return handleAllExceptions(-1, ERR);
134 }
135 }
136
137 int32_t domain_componentIndex(int32_t handle, const char* name)
138 {
139 // size getter: virtual size_t Domain1D::componentIndex(const string&)
140 try {
141 return static_cast<int32_t>(Domain1DCabinet::at(handle)->componentIndex(name));
142 } catch (...) {
143 return handleAllExceptions(ERR, ERR);
144 }
145 }
146
147 double domain_value(int32_t handle, const char* component)
148 {
149 // method: virtual double Domain1D::value(const string&)
150 try {
151 return Domain1DCabinet::at(handle)->value(component);
152 } catch (...) {
153 return handleAllExceptions(DERR, DERR);
154 }
155 }
156
157 int32_t domain_setValue(int32_t handle, const char* component, double value)
158 {
159 // method: virtual void Domain1D::setValue(const string&, double)
160 try {
161 Domain1DCabinet::at(handle)->setValue(component, value);
162 return 0;
163 } catch (...) {
164 return handleAllExceptions(-1, ERR);
165 }
166 }
167
168 int32_t domain_values(int32_t handle, const char* component, int32_t bufLen, double* buf)
169 {
170 // method: vector<double> Domain1D::values(const string&)
171 try {
172 vector<double> out = Domain1DCabinet::at(handle)->values(component);
173 std::copy(out.begin(), out.end(), buf);
174 return int(out.size());
175 } catch (...) {
176 return handleAllExceptions(-1, ERR);
177 }
178 }
179
180 int32_t domain_getValues(int32_t handle, const char* component, int32_t valuesLen, double* values)
181 {
182 // method: virtual void Domain1D::getValues(const string&, vector<double>&)
183 try {
184 vector<double> values_(valuesLen);
185 Domain1DCabinet::at(handle)->getValues(component, values_);
186 std::copy(values_.begin(), values_.end(), values);
187 return 0;
188 } catch (...) {
189 return handleAllExceptions(-1, ERR);
190 }
191 }
192
193 int32_t domain_setValues(int32_t handle, const char* component, int32_t valuesLen, const double* values)
194 {
195 // method: virtual void Domain1D::setValues(const string&, const vector<double>&)
196 try {
197 const vector<double> values_(values, values + valuesLen);
198 Domain1DCabinet::at(handle)->setValues(component, values_);
199 return 0;
200 } catch (...) {
201 return handleAllExceptions(-1, ERR);
202 }
203 }
204
205 int32_t domain_residuals(int32_t handle, const char* component, int32_t bufLen, double* buf)
206 {
207 // method: vector<double> Domain1D::residuals(const string&)
208 try {
209 vector<double> out = Domain1DCabinet::at(handle)->residuals(component);
210 std::copy(out.begin(), out.end(), buf);
211 return int(out.size());
212 } catch (...) {
213 return handleAllExceptions(-1, ERR);
214 }
215 }
216
217 int32_t domain_setProfile(int32_t handle, const char* component, int32_t posLen, const double* pos, int32_t valuesLen, const double* values)
218 {
219 // method: virtual void Domain1D::setProfile(const string&, const vector<double>&, const vector<double>&)
220 try {
221 const vector<double> pos_(pos, pos + posLen);
222 const vector<double> values_(values, values + valuesLen);
223 Domain1DCabinet::at(handle)->setProfile(component, pos_, values_);
224 return 0;
225 } catch (...) {
226 return handleAllExceptions(-1, ERR);
227 }
228 }
229
230 int32_t domain_setFlatProfile(int32_t handle, const char* component, double value)
231 {
232 // method: virtual void Domain1D::setFlatProfile(const string&, double)
233 try {
234 Domain1DCabinet::at(handle)->setFlatProfile(component, value);
235 return 0;
236 } catch (...) {
237 return handleAllExceptions(-1, ERR);
238 }
239 }
240
241 int32_t domain_setBounds(int32_t handle, int32_t n, double lower, double upper)
242 {
243 // method: void Domain1D::setBounds(size_t, double, double)
244 try {
245 Domain1DCabinet::at(handle)->setBounds(n, lower, upper);
246 return 0;
247 } catch (...) {
248 return handleAllExceptions(-1, ERR);
249 }
250 }
251
252 double domain_lowerBound(int32_t handle, int32_t n)
253 {
254 // method: double Domain1D::lowerBound(size_t)
255 try {
256 return Domain1DCabinet::at(handle)->lowerBound(n);
257 } catch (...) {
258 return handleAllExceptions(DERR, DERR);
259 }
260 }
261
262 double domain_upperBound(int32_t handle, int32_t n)
263 {
264 // method: double Domain1D::upperBound(size_t)
265 try {
266 return Domain1DCabinet::at(handle)->upperBound(n);
267 } catch (...) {
268 return handleAllExceptions(DERR, DERR);
269 }
270 }
271
272 int32_t domain_setSteadyTolerances(int32_t handle, double rtol, double atol, int32_t n)
273 {
274 // method: void Domain1D::setSteadyTolerances(double, double, size_t)
275 try {
276 Domain1DCabinet::at(handle)->setSteadyTolerances(rtol, atol, n);
277 return 0;
278 } catch (...) {
279 return handleAllExceptions(-1, ERR);
280 }
281 }
282
283 int32_t domain_setTransientTolerances(int32_t handle, double rtol, double atol, int32_t n)
284 {
285 // method: void Domain1D::setTransientTolerances(double, double, size_t)
286 try {
287 Domain1DCabinet::at(handle)->setTransientTolerances(rtol, atol, n);
288 return 0;
289 } catch (...) {
290 return handleAllExceptions(-1, ERR);
291 }
292 }
293
294 double domain_rtol(int32_t handle, int32_t n)
295 {
296 // method: double Domain1D::rtol(size_t)
297 try {
298 return Domain1DCabinet::at(handle)->rtol(n);
299 } catch (...) {
300 return handleAllExceptions(DERR, DERR);
301 }
302 }
303
304 double domain_atol(int32_t handle, int32_t n)
305 {
306 // method: double Domain1D::atol(size_t)
307 try {
308 return Domain1DCabinet::at(handle)->atol(n);
309 } catch (...) {
310 return handleAllExceptions(DERR, DERR);
311 }
312 }
313
314 int32_t domain_setupGrid(int32_t handle, int32_t gridLen, const double* grid)
315 {
316 // setter: void Domain1D::setupGrid(const vector<double>&)
317 try {
318 const vector<double> grid_(grid, grid + gridLen);
319 Domain1DCabinet::at(handle)->setupGrid(grid_);
320 return 0;
321 } catch (...) {
322 return handleAllExceptions(-1, ERR);
323 }
324 }
325
326 int32_t domain_setupUniformGrid(int32_t handle, int32_t points, double length, double start)
327 {
328 // method: void Domain1D::setupUniformGrid(size_t, double, double)
329 try {
330 Domain1DCabinet::at(handle)->setupUniformGrid(points, length, start);
331 return 0;
332 } catch (...) {
333 return handleAllExceptions(-1, ERR);
334 }
335 }
336
337 int32_t domain_setID(int32_t handle, const char* s)
338 {
339 // setter: void Domain1D::setID(const string&)
340 try {
341 Domain1DCabinet::at(handle)->setID(s);
342 return 0;
343 } catch (...) {
344 return handleAllExceptions(-1, ERR);
345 }
346 }
347
348 int32_t domain_grid(int32_t handle, int32_t bufLen, double* buf)
349 {
350 // array getter: vector<double>& Domain1D::grid()
351 try {
352 auto& obj = Domain1DCabinet::at(handle);
353 // no size checking specified
354 vector<double>& out = obj->grid();
355 std::copy(out.begin(), out.end(), buf);
356 return int(out.size());
357 } catch (...) {
358 return handleAllExceptions(-1, ERR);
359 }
360 }
361
362 int32_t bdry_setMdot(int32_t handle, double mdot)
363 {
364 // setter: virtual void Boundary1D::setMdot(double)
365 try {
366 Domain1DCabinet::as<Boundary1D>(handle)->setMdot(mdot);
367 return 0;
368 } catch (...) {
369 return handleAllExceptions(-1, ERR);
370 }
371 }
372
373 int32_t bdry_setTemperature(int32_t handle, double t)
374 {
375 // setter: virtual void Boundary1D::setTemperature(double)
376 try {
377 Domain1DCabinet::as<Boundary1D>(handle)->setTemperature(t);
378 return 0;
379 } catch (...) {
380 return handleAllExceptions(-1, ERR);
381 }
382 }
383
384 int32_t bdry_setSpreadRate(int32_t handle, double V0)
385 {
386 // setter: virtual void Boundary1D::setSpreadRate(double)
387 try {
388 Domain1DCabinet::as<Boundary1D>(handle)->setSpreadRate(V0);
389 return 0;
390 } catch (...) {
391 return handleAllExceptions(-1, ERR);
392 }
393 }
394
395 int32_t bdry_setMoleFractionsByName(int32_t handle, const char* xin)
396 {
397 // setter: virtual void Boundary1D::setMoleFractions(const string&)
398 try {
399 Domain1DCabinet::as<Boundary1D>(handle)->setMoleFractions(xin);
400 return 0;
401 } catch (...) {
402 return handleAllExceptions(-1, ERR);
403 }
404 }
405
406 int32_t bdry_setMoleFractions(int32_t handle, int32_t xinLen, const double* xin)
407 {
408 // array setter: virtual void Boundary1D::setMoleFractions(const double*)
409 try {
410 auto obj = Domain1DCabinet::as<Boundary1D>(handle);
411 // no size checking specified
412 obj->setMoleFractions(xin);
413 return 0;
414 } catch (...) {
415 return handleAllExceptions(-1, ERR);
416 }
417 }
418
419 double bdry_mdot(int32_t handle)
420 {
421 // getter: virtual double Boundary1D::mdot()
422 try {
423 return Domain1DCabinet::as<Boundary1D>(handle)->mdot();
424 } catch (...) {
425 return handleAllExceptions(DERR, DERR);
426 }
427 }
428
429 double bdry_temperature(int32_t handle)
430 {
431 // getter: virtual double Boundary1D::temperature()
432 try {
433 return Domain1DCabinet::as<Boundary1D>(handle)->temperature();
434 } catch (...) {
435 return handleAllExceptions(DERR, DERR);
436 }
437 }
438
439 double bdry_spreadRate(int32_t handle)
440 {
441 // getter: virtual double Boundary1D::spreadRate()
442 try {
443 return Domain1DCabinet::as<Boundary1D>(handle)->spreadRate();
444 } catch (...) {
445 return handleAllExceptions(DERR, DERR);
446 }
447 }
448
449 double bdry_massFraction(int32_t handle, int32_t k)
450 {
451 // method: virtual double Boundary1D::massFraction(size_t)
452 try {
453 return Domain1DCabinet::as<Boundary1D>(handle)->massFraction(k);
454 } catch (...) {
455 return handleAllExceptions(DERR, DERR);
456 }
457 }
458
459 int32_t domain_setTransport(int32_t handle, int32_t trans)
460 {
461 // setter: virtual void Domain1D::setTransport(shared_ptr<Transport>)
462 try {
463 Domain1DCabinet::at(handle)->setTransport(TransportCabinet::at(trans));
464 return 0;
465 } catch (...) {
466 return handleAllExceptions(-1, ERR);
467 }
468 }
469
470 int32_t flow_transportModel(int32_t handle, int32_t bufLen, char* buf)
471 {
472 // getter: string Flow1D::transportModel()
473 try {
474 string out = Domain1DCabinet::as<Flow1D>(handle)->transportModel();
475 copyString(out, buf, bufLen);
476 return int(out.size()) + 1;
477 } catch (...) {
478 return handleAllExceptions(-1, ERR);
479 }
480 }
481
482 int32_t domain_setTransportModel(int32_t handle, const char* model)
483 {
484 // setter: virtual void Domain1D::setTransportModel(const string&)
485 try {
486 Domain1DCabinet::at(handle)->setTransportModel(model);
487 return 0;
488 } catch (...) {
489 return handleAllExceptions(-1, ERR);
490 }
491 }
492
493 int32_t flow_enableSoret(int32_t handle, int32_t withSoret)
494 {
495 // setter: void Flow1D::enableSoret(bool)
496 try {
497 bool withSoret_ = (withSoret != 0);
498 Domain1DCabinet::as<Flow1D>(handle)->enableSoret(withSoret_);
499 return 0;
500 } catch (...) {
501 return handleAllExceptions(-1, ERR);
502 }
503 }
504
505 int32_t flow_setPressure(int32_t handle, double p)
506 {
507 // setter: void Flow1D::setPressure(double)
508 try {
509 Domain1DCabinet::as<Flow1D>(handle)->setPressure(p);
510 return 0;
511 } catch (...) {
512 return handleAllExceptions(-1, ERR);
513 }
514 }
515
516 double flow_pressure(int32_t handle)
517 {
518 // getter: double Flow1D::pressure()
519 try {
520 return Domain1DCabinet::as<Flow1D>(handle)->pressure();
521 } catch (...) {
522 return handleAllExceptions(DERR, DERR);
523 }
524 }
525
526 int32_t flow_setFixedTempProfile(int32_t handle, int32_t zfixedLen, const double* zfixed, int32_t tfixedLen, const double* tfixed)
527 {
528 // method: void Flow1D::setFixedTempProfile(const vector<double>&, const vector<double>&)
529 try {
530 const vector<double> zfixed_(zfixed, zfixed + zfixedLen);
531 const vector<double> tfixed_(tfixed, tfixed + tfixedLen);
532 Domain1DCabinet::as<Flow1D>(handle)->setFixedTempProfile(zfixed_, tfixed_);
533 return 0;
534 } catch (...) {
535 return handleAllExceptions(-1, ERR);
536 }
537 }
538
539 int32_t flow_solveEnergyEqn(int32_t handle, int32_t j)
540 {
541 // setter: void Flow1D::solveEnergyEqn(size_t)
542 try {
543 Domain1DCabinet::as<Flow1D>(handle)->solveEnergyEqn(j);
544 return 0;
545 } catch (...) {
546 return handleAllExceptions(-1, ERR);
547 }
548 }
549
550 int32_t flow_allOfEnergyEnabled(int32_t handle)
551 {
552 // getter: bool Flow1D::allOfEnergyEnabled()
553 try {
554 bool out = Domain1DCabinet::as<Flow1D>(handle)->allOfEnergyEnabled();
555 return int(out);
556 } catch (...) {
557 return handleAllExceptions(-1, ERR);
558 }
559 }
560
561 int32_t flow_noneOfEnergyEnabled(int32_t handle)
562 {
563 // getter: bool Flow1D::noneOfEnergyEnabled()
564 try {
565 bool out = Domain1DCabinet::as<Flow1D>(handle)->noneOfEnergyEnabled();
566 return int(out);
567 } catch (...) {
568 return handleAllExceptions(-1, ERR);
569 }
570 }
571
572 int32_t flow_setEnergyEnabled(int32_t handle, int32_t flag)
573 {
574 // setter: void Flow1D::setEnergyEnabled(bool)
575 try {
576 bool flag_ = (flag != 0);
577 Domain1DCabinet::as<Flow1D>(handle)->setEnergyEnabled(flag_);
578 return 0;
579 } catch (...) {
580 return handleAllExceptions(-1, ERR);
581 }
582 }
583
584 int32_t reactingsurf_enableCoverageEquations(int32_t handle, int32_t docov)
585 {
586 // setter: void ReactingSurf1D::enableCoverageEquations(bool)
587 try {
588 bool docov_ = (docov != 0);
589 Domain1DCabinet::as<ReactingSurf1D>(handle)->enableCoverageEquations(docov_);
590 return 0;
591 } catch (...) {
592 return handleAllExceptions(-1, ERR);
593 }
594 }
595
596 int32_t domain_getRefineCriteria(int32_t handle, int32_t bufLen, double* buf)
597 {
598 // array getter: vector<double> Domain1D::getRefineCriteria()
599 try {
600 auto& obj = Domain1DCabinet::at(handle);
601 // no size checking specified
602 vector<double> out = obj->getRefineCriteria();
603 std::copy(out.begin(), out.end(), buf);
604 return int(out.size());
605 } catch (...) {
606 return handleAllExceptions(-1, ERR);
607 }
608 }
609
610 int32_t domain_setRefineCriteria(int32_t handle, double ratio, double slope, double curve, double prune)
611 {
612 // method: void Domain1D::setRefineCriteria(double, double, double, double)
613 try {
614 Domain1DCabinet::at(handle)->setRefineCriteria(ratio, slope, curve, prune);
615 return 0;
616 } catch (...) {
617 return handleAllExceptions(-1, ERR);
618 }
619 }
620
621 int32_t domain_info(int32_t handle, int32_t rows, int32_t width, int32_t bufLen, char* buf)
622 {
623 // method: string Domain1D::_info(int, int)
624 try {
625 string out = Domain1DCabinet::at(handle)->_info(rows, width);
626 copyString(out, buf, bufLen);
627 return int(out.size()) + 1;
628 } catch (...) {
629 return handleAllExceptions(-1, ERR);
630 }
631 }
632
633 int32_t domain_del(int32_t handle)
634 {
635 // destructor
636 try {
637 Domain1DCabinet::del(handle);
638 return 0;
639 } catch (...) {
640 return handleAllExceptions(-1, ERR);
641 }
642 }
643
645 {
646 // reserved CLib function: custom code
647 try {
648 // *************** begin custom code ***************
649 return Domain1DCabinet::size();
650 // **************** end custom code ****************
651 } catch (...) {
652 return handleAllExceptions(-1, ERR);
653 }
654 }
655
656} // extern "C"
Boundary objects for one-dimensional simulations.
Header file defining class TransportFactory (see TransportFactory)
Template for classes to hold pointers to objects.
Definition Cabinet.h:51
CTDOMAIN - Generated CLib Cantera interface library.
int32_t domain_cabinetSize()
Return size of Domain1D storage.
Definition ctdomain.cpp:644
double bdry_spreadRate(int32_t handle)
Tangential velocity gradient [1/s] at this boundary.
Definition ctdomain.cpp:439
double domain_rtol(int32_t handle, int32_t n)
Relative tolerance of the nth component.
Definition ctdomain.cpp:294
int32_t domain_setTransportModel(int32_t handle, const char *model)
Set transport model by name.
Definition ctdomain.cpp:482
double domain_atol(int32_t handle, int32_t n)
Absolute tolerance of the nth component.
Definition ctdomain.cpp:304
int32_t domain_setupUniformGrid(int32_t handle, int32_t points, double length, double start)
Set up uniform grid.
Definition ctdomain.cpp:326
double bdry_temperature(int32_t handle)
Temperature [K].
Definition ctdomain.cpp:429
int32_t domain_grid(int32_t handle, int32_t bufLen, double *buf)
Access the array of grid coordinates [m].
Definition ctdomain.cpp:348
int32_t domain_componentName(int32_t handle, int32_t n, int32_t bufLen, char *buf)
Name of component n.
Definition ctdomain.cpp:125
int32_t domain_setProfile(int32_t handle, const char *component, int32_t posLen, const double *pos, int32_t valuesLen, const double *values)
Specify a profile for a component.
Definition ctdomain.cpp:217
int32_t flow_enableSoret(int32_t handle, int32_t withSoret)
Enable thermal diffusion, also known as Soret diffusion.
Definition ctdomain.cpp:493
double domain_value(int32_t handle, const char *component)
Set a single component value at a boundary.
Definition ctdomain.cpp:147
int32_t flow_solveEnergyEqn(int32_t handle, int32_t j)
Specify that the energy equation should be solved at point j.
Definition ctdomain.cpp:539
int32_t flow_setEnergyEnabled(int32_t handle, int32_t flag)
Set energy enabled flag for entire domain.
Definition ctdomain.cpp:572
int32_t domain_getValues(int32_t handle, const char *component, int32_t valuesLen, double *values)
Retrieve component values.
Definition ctdomain.cpp:180
int32_t domain_setID(int32_t handle, const char *s)
Specify an identifying tag for this domain.
Definition ctdomain.cpp:337
int32_t domain_nPoints(int32_t handle)
Number of grid points in this domain.
Definition ctdomain.cpp:115
double domain_upperBound(int32_t handle, int32_t n)
Upper bound on the nth component.
Definition ctdomain.cpp:262
int32_t domain_setTransientTolerances(int32_t handle, double rtol, double atol, int32_t n)
Set tolerances for time-stepping mode.
Definition ctdomain.cpp:283
int32_t domain_setValues(int32_t handle, const char *component, int32_t valuesLen, const double *values)
Specify component values.
Definition ctdomain.cpp:193
int32_t bdry_setSpreadRate(int32_t handle, double V0)
Set tangential velocity gradient [1/s] at this boundary.
Definition ctdomain.cpp:384
int32_t domain_setRefineCriteria(int32_t handle, double ratio, double slope, double curve, double prune)
Set grid refinement criteria.
Definition ctdomain.cpp:610
int32_t domain_getRefineCriteria(int32_t handle, int32_t bufLen, double *buf)
Get the grid refinement criteria.
Definition ctdomain.cpp:596
int32_t domain_residuals(int32_t handle, const char *component, int32_t bufLen, double *buf)
Retrieve internal work array values for a component.
Definition ctdomain.cpp:205
int32_t flow_noneOfEnergyEnabled(int32_t handle)
Check if energy is disabled for entire domain.
Definition ctdomain.cpp:561
int32_t flow_setFixedTempProfile(int32_t handle, int32_t zfixedLen, const double *zfixed, int32_t tfixedLen, const double *tfixed)
Set fixed temperature profile.
Definition ctdomain.cpp:526
double bdry_mdot(int32_t handle)
The total mass flow rate [kg/m2/s].
Definition ctdomain.cpp:419
int32_t flow_allOfEnergyEnabled(int32_t handle)
Check if energy is enabled for entire domain.
Definition ctdomain.cpp:550
int32_t domain_setupGrid(int32_t handle, int32_t gridLen, const double *grid)
Set up initial grid.
Definition ctdomain.cpp:314
int32_t domain_del(int32_t handle)
Delete Domain1D object.
Definition ctdomain.cpp:633
int32_t domain_setValue(int32_t handle, const char *component, double value)
Set a single component value in a flow domain or at a boundary.
Definition ctdomain.cpp:157
int32_t domain_newBoundary1D(const char *domainType, int32_t solution, const char *id)
Create a Boundary1D object of the specified type.
Definition ctdomain.cpp:63
int32_t domain_nComponents(int32_t handle)
Number of components at each grid point.
Definition ctdomain.cpp:105
double bdry_massFraction(int32_t handle, int32_t k)
Mass fraction of species k.
Definition ctdomain.cpp:449
int32_t reactingsurf_enableCoverageEquations(int32_t handle, int32_t docov)
Set whether to solve the equations for the surface species coverages.
Definition ctdomain.cpp:584
int32_t domain_index(int32_t handle, int32_t n, int32_t j)
Returns the index of the solution vector, which corresponds to component n at grid point j.
Definition ctdomain.cpp:95
int32_t flow_transportModel(int32_t handle, int32_t bufLen, char *buf)
Retrieve transport model.
Definition ctdomain.cpp:470
int32_t bdry_setTemperature(int32_t handle, double t)
Set the temperature.
Definition ctdomain.cpp:373
int32_t bdry_setMoleFractions(int32_t handle, int32_t xinLen, const double *xin)
Set the mole fractions by specifying an array.
Definition ctdomain.cpp:406
int32_t bdry_setMoleFractionsByName(int32_t handle, const char *xin)
Set the mole fractions by specifying a string.
Definition ctdomain.cpp:395
double domain_lowerBound(int32_t handle, int32_t n)
Lower bound on the nth component.
Definition ctdomain.cpp:252
int32_t domain_setTransport(int32_t handle, int32_t trans)
Set transport model to existing instance.
Definition ctdomain.cpp:459
int32_t domain_type(int32_t handle, int32_t bufLen, char *buf)
String indicating the domain implemented.
Definition ctdomain.cpp:73
int32_t domain_values(int32_t handle, const char *component, int32_t bufLen, double *buf)
Retrieve component values.
Definition ctdomain.cpp:168
int32_t flow_setPressure(int32_t handle, double p)
Set the pressure.
Definition ctdomain.cpp:505
int32_t domain_newFlow1D(const char *domainType, int32_t solution, const char *id)
Create a Flow1D object of the specified type.
Definition ctdomain.cpp:53
int32_t domain_setSteadyTolerances(int32_t handle, double rtol, double atol, int32_t n)
Set tolerances for steady-state mode.
Definition ctdomain.cpp:272
double flow_pressure(int32_t handle)
The current pressure [Pa].
Definition ctdomain.cpp:516
int32_t domain_info(int32_t handle, int32_t rows, int32_t width, int32_t bufLen, char *buf)
Return a concise summary of a Domain.
Definition ctdomain.cpp:621
int32_t bdry_setMdot(int32_t handle, double mdot)
Set the total mass flow rate [kg/m²/s].
Definition ctdomain.cpp:362
int32_t domain_domainIndex(int32_t handle)
The left-to-right location of this domain.
Definition ctdomain.cpp:85
int32_t domain_componentIndex(int32_t handle, const char *name)
Index of component with name name.
Definition ctdomain.cpp:137
int32_t domain_setFlatProfile(int32_t handle, const char *component, double value)
Specify a flat profile for a component.
Definition ctdomain.cpp:230
int32_t domain_setBounds(int32_t handle, int32_t n, double lower, double upper)
Set the upper and lower bounds for a solution component, n.
Definition ctdomain.cpp:241
size_t copyString(const string &source, char *dest, size_t length)
Copy the contents of a string into a char array of a given length.
shared_ptr< Flow1D > newFlow1D(const string &domainType, shared_ptr< Solution > solution, const string &id)
Create a Flow1D object of the specified type.
shared_ptr< Boundary1D > newBoundary1D(const string &domainType, shared_ptr< Solution > solution, const string &id)
Create a Boundary1D object of the specified type.
Namespace for the Cantera kernel.
Definition AnyMap.cpp:595
T handleAllExceptions(T ctErrorCode, T otherErrorCode)
Exception handler used at language interface boundaries.
Definition clib_utils.h:32
Contains declarations for string manipulation functions within Cantera.