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