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