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