Cantera  3.2.0a4
Loading...
Searching...
No Matches
ctthermo.cpp
Go to the documentation of this file.
1/**
2 * CTTHERMO - Generated CLib %Cantera interface library.
3 *
4 * @file ctthermo.cpp
5 *
6 * Generated CLib API for Cantera's ThermoPhase 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
25using namespace Cantera;
26
27//! @cond
28//! Cabinet type definitions will be ignored by Doxygen
29
30// Define Cabinet<ThermoPhase> (single-instance object)
31typedef Cabinet<ThermoPhase> ThermoPhaseCabinet;
32template<> ThermoPhaseCabinet* ThermoPhaseCabinet::s_storage = 0; // initialized here
33
34//! @endcond
35
36extern "C" {
37
38 int32_t thermo_name(int32_t handle, int32_t bufLen, char* buf)
39 {
40 // getter: string Phase::name()
41 try {
42 string out = ThermoPhaseCabinet::as<Phase>(handle)->name();
43 copyString(out, buf, bufLen);
44 return int(out.size()) + 1;
45 } catch (...) {
46 return handleAllExceptions(-1, ERR);
47 }
48 }
49
50 int32_t thermo_setName(int32_t handle, const char* nm)
51 {
52 // setter: void Phase::setName(const string&)
53 try {
54 ThermoPhaseCabinet::as<Phase>(handle)->setName(nm);
55 return 0;
56 } catch (...) {
57 return handleAllExceptions(-1, ERR);
58 }
59 }
60
61 int32_t thermo_type(int32_t handle, int32_t bufLen, char* buf)
62 {
63 // getter: string ThermoPhase::type()
64 try {
65 string out = ThermoPhaseCabinet::at(handle)->type();
66 copyString(out, buf, bufLen);
67 return int(out.size()) + 1;
68 } catch (...) {
69 return handleAllExceptions(-1, ERR);
70 }
71 }
72
73 int32_t thermo_nElements(int32_t handle)
74 {
75 // getter: size_t Phase::nElements()
76 try {
77 return ThermoPhaseCabinet::as<Phase>(handle)->nElements();
78 } catch (...) {
79 return handleAllExceptions(ERR, ERR);
80 }
81 }
82
83 int32_t thermo_nSpecies(int32_t handle)
84 {
85 // getter: size_t Phase::nSpecies()
86 try {
87 return ThermoPhaseCabinet::as<Phase>(handle)->nSpecies();
88 } catch (...) {
89 return handleAllExceptions(ERR, ERR);
90 }
91 }
92
93 double thermo_temperature(int32_t handle)
94 {
95 // getter: double Phase::temperature()
96 try {
97 return ThermoPhaseCabinet::as<Phase>(handle)->temperature();
98 } catch (...) {
99 return handleAllExceptions(DERR, DERR);
100 }
101 }
102
103 int32_t thermo_setTemperature(int32_t handle, double temp)
104 {
105 // setter: virtual void Phase::setTemperature(double)
106 try {
107 ThermoPhaseCabinet::as<Phase>(handle)->setTemperature(temp);
108 return 0;
109 } catch (...) {
110 return handleAllExceptions(-1, ERR);
111 }
112 }
113
114 double thermo_pressure(int32_t handle)
115 {
116 // getter: virtual double Phase::pressure()
117 try {
118 return ThermoPhaseCabinet::as<Phase>(handle)->pressure();
119 } catch (...) {
120 return handleAllExceptions(DERR, DERR);
121 }
122 }
123
124 int32_t thermo_setPressure(int32_t handle, double p)
125 {
126 // setter: virtual void Phase::setPressure(double)
127 try {
128 ThermoPhaseCabinet::as<Phase>(handle)->setPressure(p);
129 return 0;
130 } catch (...) {
131 return handleAllExceptions(-1, ERR);
132 }
133 }
134
135 double thermo_density(int32_t handle)
136 {
137 // getter: virtual double Phase::density()
138 try {
139 return ThermoPhaseCabinet::as<Phase>(handle)->density();
140 } catch (...) {
141 return handleAllExceptions(DERR, DERR);
142 }
143 }
144
145 int32_t thermo_setDensity(int32_t handle, const double density_)
146 {
147 // setter: virtual void Phase::setDensity(const double)
148 try {
149 ThermoPhaseCabinet::as<Phase>(handle)->setDensity(density_);
150 return 0;
151 } catch (...) {
152 return handleAllExceptions(-1, ERR);
153 }
154 }
155
156 double thermo_molarDensity(int32_t handle)
157 {
158 // getter: virtual double Phase::molarDensity()
159 try {
160 return ThermoPhaseCabinet::as<Phase>(handle)->molarDensity();
161 } catch (...) {
162 return handleAllExceptions(DERR, DERR);
163 }
164 }
165
166 double thermo_meanMolecularWeight(int32_t handle)
167 {
168 // getter: double Phase::meanMolecularWeight()
169 try {
170 return ThermoPhaseCabinet::as<Phase>(handle)->meanMolecularWeight();
171 } catch (...) {
172 return handleAllExceptions(DERR, DERR);
173 }
174 }
175
176 double thermo_moleFraction(int32_t handle, int32_t k)
177 {
178 // method: double Phase::moleFraction(size_t)
179 try {
180 return ThermoPhaseCabinet::as<Phase>(handle)->moleFraction(k);
181 } catch (...) {
182 return handleAllExceptions(DERR, DERR);
183 }
184 }
185
186 double thermo_massFraction(int32_t handle, int32_t k)
187 {
188 // method: double Phase::massFraction(size_t)
189 try {
190 return ThermoPhaseCabinet::as<Phase>(handle)->massFraction(k);
191 } catch (...) {
192 return handleAllExceptions(DERR, DERR);
193 }
194 }
195
196 int32_t thermo_getMoleFractions(int32_t handle, int32_t xLen, double* x)
197 {
198 // getter: void Phase::getMoleFractions(double* const)
199 try {
200 auto obj = ThermoPhaseCabinet::as<Phase>(handle);
201 if (xLen < obj->nSpecies()) {
202 throw ArraySizeError("thermo_getMoleFractions", xLen, obj->nSpecies());
203 }
204 obj->getMoleFractions(x);
205 return 0;
206 } catch (...) {
207 return handleAllExceptions(-1, ERR);
208 }
209 }
210
211 int32_t thermo_getMassFractions(int32_t handle, int32_t yLen, double* y)
212 {
213 // getter: void Phase::getMassFractions(double* const)
214 try {
215 auto obj = ThermoPhaseCabinet::as<Phase>(handle);
216 if (yLen < obj->nSpecies()) {
217 throw ArraySizeError("thermo_getMassFractions", yLen, obj->nSpecies());
218 }
219 obj->getMassFractions(y);
220 return 0;
221 } catch (...) {
222 return handleAllExceptions(-1, ERR);
223 }
224 }
225
226 int32_t thermo_setMoleFractions(int32_t handle, int32_t xLen, const double* x)
227 {
228 // setter: virtual void Phase::setMoleFractions(const double* const)
229 try {
230 auto obj = ThermoPhaseCabinet::as<Phase>(handle);
231 if (xLen != obj->nSpecies()) {
232 throw ArraySizeError("thermo_setMoleFractions", xLen, obj->nSpecies());
233 }
234 obj->setMoleFractions(x);
235 return 0;
236 } catch (...) {
237 return handleAllExceptions(-1, ERR);
238 }
239 }
240
241 int32_t thermo_setMassFractions(int32_t handle, int32_t yLen, const double* y)
242 {
243 // setter: virtual void Phase::setMassFractions(const double* const)
244 try {
245 auto obj = ThermoPhaseCabinet::as<Phase>(handle);
246 if (yLen != obj->nSpecies()) {
247 throw ArraySizeError("thermo_setMassFractions", yLen, obj->nSpecies());
248 }
249 obj->setMassFractions(y);
250 return 0;
251 } catch (...) {
252 return handleAllExceptions(-1, ERR);
253 }
254 }
255
256 int32_t thermo_setMoleFractionsByName(int32_t handle, const char* x)
257 {
258 // setter: void Phase::setMoleFractionsByName(const string&)
259 try {
260 ThermoPhaseCabinet::as<Phase>(handle)->setMoleFractionsByName(x);
261 return 0;
262 } catch (...) {
263 return handleAllExceptions(-1, ERR);
264 }
265 }
266
267 int32_t thermo_setMassFractionsByName(int32_t handle, const char* x)
268 {
269 // setter: void Phase::setMassFractionsByName(const string&)
270 try {
271 ThermoPhaseCabinet::as<Phase>(handle)->setMassFractionsByName(x);
272 return 0;
273 } catch (...) {
274 return handleAllExceptions(-1, ERR);
275 }
276 }
277
278 int32_t thermo_atomicWeights(int32_t handle, int32_t bufLen, double* buf)
279 {
280 // getter: const vector<double>& Phase::atomicWeights()
281 try {
282 auto obj = ThermoPhaseCabinet::as<Phase>(handle);
283 if (bufLen < obj->nElements()) {
284 throw ArraySizeError("thermo_atomicWeights", bufLen, obj->nElements());
285 }
286 const vector<double>& out = obj->atomicWeights();
287 std::copy(out.begin(), out.end(), buf);
288 return int(out.size());
289 } catch (...) {
290 return handleAllExceptions(-1, ERR);
291 }
292 }
293
294 int32_t thermo_getMolecularWeights(int32_t handle, int32_t weightsLen, double* weights)
295 {
296 // getter: void Phase::getMolecularWeights(double*)
297 try {
298 auto obj = ThermoPhaseCabinet::as<Phase>(handle);
299 if (weightsLen < obj->nSpecies()) {
300 throw ArraySizeError("thermo_getMolecularWeights", weightsLen, obj->nSpecies());
301 }
302 obj->getMolecularWeights(weights);
303 return 0;
304 } catch (...) {
305 return handleAllExceptions(-1, ERR);
306 }
307 }
308
309 int32_t thermo_getCharges(int32_t handle, int32_t chargesLen, double* charges)
310 {
311 // getter: void Phase::getCharges(double*)
312 try {
313 auto obj = ThermoPhaseCabinet::as<Phase>(handle);
314 if (chargesLen < obj->nElements()) {
315 throw ArraySizeError("thermo_getCharges", chargesLen, obj->nElements());
316 }
317 obj->getCharges(charges);
318 return 0;
319 } catch (...) {
320 return handleAllExceptions(-1, ERR);
321 }
322 }
323
324 int32_t thermo_elementName(int32_t handle, int32_t m, int32_t bufLen, char* buf)
325 {
326 // method: string Phase::elementName(size_t)
327 try {
328 string out = ThermoPhaseCabinet::as<Phase>(handle)->elementName(m);
329 copyString(out, buf, bufLen);
330 return int(out.size()) + 1;
331 } catch (...) {
332 return handleAllExceptions(-1, ERR);
333 }
334 }
335
336 int32_t thermo_speciesName(int32_t handle, int32_t k, int32_t bufLen, char* buf)
337 {
338 // method: string Phase::speciesName(size_t)
339 try {
340 string out = ThermoPhaseCabinet::as<Phase>(handle)->speciesName(k);
341 copyString(out, buf, bufLen);
342 return int(out.size()) + 1;
343 } catch (...) {
344 return handleAllExceptions(-1, ERR);
345 }
346 }
347
348 int32_t thermo_elementIndex(int32_t handle, const char* name)
349 {
350 // method: size_t Phase::elementIndex(const string&)
351 try {
352 return ThermoPhaseCabinet::as<Phase>(handle)->elementIndex(name);
353 } catch (...) {
354 return handleAllExceptions(ERR, ERR);
355 }
356 }
357
358 int32_t thermo_speciesIndex(int32_t handle, const char* name)
359 {
360 // method: size_t Phase::speciesIndex(const string&)
361 try {
362 return ThermoPhaseCabinet::as<Phase>(handle)->speciesIndex(name);
363 } catch (...) {
364 return handleAllExceptions(ERR, ERR);
365 }
366 }
367
368 double thermo_nAtoms(int32_t handle, int32_t k, int32_t m)
369 {
370 // method: double Phase::nAtoms(size_t, size_t)
371 try {
372 return ThermoPhaseCabinet::as<Phase>(handle)->nAtoms(k, m);
373 } catch (...) {
374 return handleAllExceptions(DERR, DERR);
375 }
376 }
377
378 int32_t thermo_addElement(int32_t handle, const char* symbol, double weight, int32_t atomicNumber, double entropy298, int32_t elem_type)
379 {
380 // method: size_t Phase::addElement(const string&, double, int, double, int)
381 try {
382 return ThermoPhaseCabinet::as<Phase>(handle)->addElement(symbol, weight, atomicNumber, entropy298, elem_type);
383 } catch (...) {
384 return handleAllExceptions(ERR, ERR);
385 }
386 }
387
388 double thermo_refPressure(int32_t handle)
389 {
390 // getter: virtual double ThermoPhase::refPressure()
391 try {
392 return ThermoPhaseCabinet::at(handle)->refPressure();
393 } catch (...) {
394 return handleAllExceptions(DERR, DERR);
395 }
396 }
397
398 double thermo_minTemp(int32_t handle, int32_t k)
399 {
400 // method: virtual double ThermoPhase::minTemp(size_t)
401 try {
402 return ThermoPhaseCabinet::at(handle)->minTemp(k);
403 } catch (...) {
404 return handleAllExceptions(DERR, DERR);
405 }
406 }
407
408 double thermo_maxTemp(int32_t handle, int32_t k)
409 {
410 // method: virtual double ThermoPhase::maxTemp(size_t)
411 try {
412 return ThermoPhaseCabinet::at(handle)->maxTemp(k);
413 } catch (...) {
414 return handleAllExceptions(DERR, DERR);
415 }
416 }
417
418 double thermo_enthalpy_mole(int32_t handle)
419 {
420 // getter: virtual double ThermoPhase::enthalpy_mole()
421 try {
422 return ThermoPhaseCabinet::at(handle)->enthalpy_mole();
423 } catch (...) {
424 return handleAllExceptions(DERR, DERR);
425 }
426 }
427
428 double thermo_enthalpy_mass(int32_t handle)
429 {
430 // getter: double ThermoPhase::enthalpy_mass()
431 try {
432 return ThermoPhaseCabinet::at(handle)->enthalpy_mass();
433 } catch (...) {
434 return handleAllExceptions(DERR, DERR);
435 }
436 }
437
438 double thermo_entropy_mole(int32_t handle)
439 {
440 // getter: virtual double ThermoPhase::entropy_mole()
441 try {
442 return ThermoPhaseCabinet::at(handle)->entropy_mole();
443 } catch (...) {
444 return handleAllExceptions(DERR, DERR);
445 }
446 }
447
448 double thermo_entropy_mass(int32_t handle)
449 {
450 // getter: double ThermoPhase::entropy_mass()
451 try {
452 return ThermoPhaseCabinet::at(handle)->entropy_mass();
453 } catch (...) {
454 return handleAllExceptions(DERR, DERR);
455 }
456 }
457
458 double thermo_intEnergy_mole(int32_t handle)
459 {
460 // getter: virtual double ThermoPhase::intEnergy_mole()
461 try {
462 return ThermoPhaseCabinet::at(handle)->intEnergy_mole();
463 } catch (...) {
464 return handleAllExceptions(DERR, DERR);
465 }
466 }
467
468 double thermo_intEnergy_mass(int32_t handle)
469 {
470 // getter: double ThermoPhase::intEnergy_mass()
471 try {
472 return ThermoPhaseCabinet::at(handle)->intEnergy_mass();
473 } catch (...) {
474 return handleAllExceptions(DERR, DERR);
475 }
476 }
477
478 double thermo_gibbs_mole(int32_t handle)
479 {
480 // getter: virtual double ThermoPhase::gibbs_mole()
481 try {
482 return ThermoPhaseCabinet::at(handle)->gibbs_mole();
483 } catch (...) {
484 return handleAllExceptions(DERR, DERR);
485 }
486 }
487
488 double thermo_gibbs_mass(int32_t handle)
489 {
490 // getter: double ThermoPhase::gibbs_mass()
491 try {
492 return ThermoPhaseCabinet::at(handle)->gibbs_mass();
493 } catch (...) {
494 return handleAllExceptions(DERR, DERR);
495 }
496 }
497
498 double thermo_cp_mole(int32_t handle)
499 {
500 // getter: virtual double ThermoPhase::cp_mole()
501 try {
502 return ThermoPhaseCabinet::at(handle)->cp_mole();
503 } catch (...) {
504 return handleAllExceptions(DERR, DERR);
505 }
506 }
507
508 double thermo_cp_mass(int32_t handle)
509 {
510 // getter: double ThermoPhase::cp_mass()
511 try {
512 return ThermoPhaseCabinet::at(handle)->cp_mass();
513 } catch (...) {
514 return handleAllExceptions(DERR, DERR);
515 }
516 }
517
518 double thermo_cv_mole(int32_t handle)
519 {
520 // getter: virtual double ThermoPhase::cv_mole()
521 try {
522 return ThermoPhaseCabinet::at(handle)->cv_mole();
523 } catch (...) {
524 return handleAllExceptions(DERR, DERR);
525 }
526 }
527
528 double thermo_cv_mass(int32_t handle)
529 {
530 // getter: double ThermoPhase::cv_mass()
531 try {
532 return ThermoPhaseCabinet::at(handle)->cv_mass();
533 } catch (...) {
534 return handleAllExceptions(DERR, DERR);
535 }
536 }
537
538 int32_t thermo_getChemPotentials(int32_t handle, int32_t muLen, double* mu)
539 {
540 // getter: virtual void ThermoPhase::getChemPotentials(double*)
541 try {
542 auto& obj = ThermoPhaseCabinet::at(handle);
543 // no size checking specified
544 obj->getChemPotentials(mu);
545 return 0;
546 } catch (...) {
547 return handleAllExceptions(-1, ERR);
548 }
549 }
550
551 int32_t thermo_getElectrochemPotentials(int32_t handle, int32_t muLen, double* mu)
552 {
553 // getter: void ThermoPhase::getElectrochemPotentials(double*)
554 try {
555 auto& obj = ThermoPhaseCabinet::at(handle);
556 // no size checking specified
557 obj->getElectrochemPotentials(mu);
558 return 0;
559 } catch (...) {
560 return handleAllExceptions(-1, ERR);
561 }
562 }
563
564 double thermo_electricPotential(int32_t handle)
565 {
566 // getter: double ThermoPhase::electricPotential()
567 try {
568 return ThermoPhaseCabinet::at(handle)->electricPotential();
569 } catch (...) {
570 return handleAllExceptions(DERR, DERR);
571 }
572 }
573
574 int32_t thermo_setElectricPotential(int32_t handle, double v)
575 {
576 // setter: void ThermoPhase::setElectricPotential(double)
577 try {
578 ThermoPhaseCabinet::at(handle)->setElectricPotential(v);
579 return 0;
580 } catch (...) {
581 return handleAllExceptions(-1, ERR);
582 }
583 }
584
585 double thermo_thermalExpansionCoeff(int32_t handle)
586 {
587 // getter: virtual double ThermoPhase::thermalExpansionCoeff()
588 try {
589 return ThermoPhaseCabinet::at(handle)->thermalExpansionCoeff();
590 } catch (...) {
591 return handleAllExceptions(DERR, DERR);
592 }
593 }
594
595 double thermo_isothermalCompressibility(int32_t handle)
596 {
597 // getter: virtual double ThermoPhase::isothermalCompressibility()
598 try {
599 return ThermoPhaseCabinet::at(handle)->isothermalCompressibility();
600 } catch (...) {
601 return handleAllExceptions(DERR, DERR);
602 }
603 }
604
605 int32_t thermo_getPartialMolarEnthalpies(int32_t handle, int32_t hbarLen, double* hbar)
606 {
607 // getter: virtual void ThermoPhase::getPartialMolarEnthalpies(double*)
608 try {
609 auto& obj = ThermoPhaseCabinet::at(handle);
610 // no size checking specified
611 obj->getPartialMolarEnthalpies(hbar);
612 return 0;
613 } catch (...) {
614 return handleAllExceptions(-1, ERR);
615 }
616 }
617
618 int32_t thermo_getPartialMolarEntropies(int32_t handle, int32_t sbarLen, double* sbar)
619 {
620 // getter: virtual void ThermoPhase::getPartialMolarEntropies(double*)
621 try {
622 auto& obj = ThermoPhaseCabinet::at(handle);
623 // no size checking specified
624 obj->getPartialMolarEntropies(sbar);
625 return 0;
626 } catch (...) {
627 return handleAllExceptions(-1, ERR);
628 }
629 }
630
631 int32_t thermo_getPartialMolarIntEnergies(int32_t handle, int32_t ubarLen, double* ubar)
632 {
633 // getter: virtual void ThermoPhase::getPartialMolarIntEnergies(double*)
634 try {
635 auto& obj = ThermoPhaseCabinet::at(handle);
636 // no size checking specified
637 obj->getPartialMolarIntEnergies(ubar);
638 return 0;
639 } catch (...) {
640 return handleAllExceptions(-1, ERR);
641 }
642 }
643
644 int32_t thermo_getPartialMolarCp(int32_t handle, int32_t cpbarLen, double* cpbar)
645 {
646 // getter: virtual void ThermoPhase::getPartialMolarCp(double*)
647 try {
648 auto& obj = ThermoPhaseCabinet::at(handle);
649 // no size checking specified
650 obj->getPartialMolarCp(cpbar);
651 return 0;
652 } catch (...) {
653 return handleAllExceptions(-1, ERR);
654 }
655 }
656
657 int32_t thermo_getPartialMolarVolumes(int32_t handle, int32_t vbarLen, double* vbar)
658 {
659 // getter: virtual void ThermoPhase::getPartialMolarVolumes(double*)
660 try {
661 auto& obj = ThermoPhaseCabinet::at(handle);
662 // no size checking specified
663 obj->getPartialMolarVolumes(vbar);
664 return 0;
665 } catch (...) {
666 return handleAllExceptions(-1, ERR);
667 }
668 }
669
670 int32_t thermo_setState_TPX(int32_t handle, double t, double p, int32_t xLen, const double* x)
671 {
672 // method: virtual void ThermoPhase::setState_TPX(double, double, const double*)
673 try {
674 ThermoPhaseCabinet::at(handle)->setState_TPX(t, p, x);
675 return 0;
676 } catch (...) {
677 return handleAllExceptions(-1, ERR);
678 }
679 }
680
681 int32_t thermo_setState_TPY(int32_t handle, double t, double p, int32_t yLen, const double* y)
682 {
683 // method: virtual void ThermoPhase::setState_TPY(double, double, const double*)
684 try {
685 ThermoPhaseCabinet::at(handle)->setState_TPY(t, p, y);
686 return 0;
687 } catch (...) {
688 return handleAllExceptions(-1, ERR);
689 }
690 }
691
692 int32_t thermo_setState_TP(int32_t handle, double t, double p)
693 {
694 // method: virtual void ThermoPhase::setState_TP(double, double)
695 try {
696 ThermoPhaseCabinet::at(handle)->setState_TP(t, p);
697 return 0;
698 } catch (...) {
699 return handleAllExceptions(-1, ERR);
700 }
701 }
702
703 int32_t thermo_setState_TD(int32_t handle, double t, double rho)
704 {
705 // method: void Phase::setState_TD(double, double)
706 try {
707 ThermoPhaseCabinet::as<Phase>(handle)->setState_TD(t, rho);
708 return 0;
709 } catch (...) {
710 return handleAllExceptions(-1, ERR);
711 }
712 }
713
714 int32_t thermo_setState_DP(int32_t handle, double rho, double p)
715 {
716 // method: virtual void ThermoPhase::setState_DP(double, double)
717 try {
718 ThermoPhaseCabinet::at(handle)->setState_DP(rho, p);
719 return 0;
720 } catch (...) {
721 return handleAllExceptions(-1, ERR);
722 }
723 }
724
725 int32_t thermo_setState_HP(int32_t handle, double h, double p)
726 {
727 // method: virtual void ThermoPhase::setState_HP(double, double)
728 try {
729 ThermoPhaseCabinet::at(handle)->setState_HP(h, p);
730 return 0;
731 } catch (...) {
732 return handleAllExceptions(-1, ERR);
733 }
734 }
735
736 int32_t thermo_setState_UV(int32_t handle, double u, double v)
737 {
738 // method: virtual void ThermoPhase::setState_UV(double, double)
739 try {
740 ThermoPhaseCabinet::at(handle)->setState_UV(u, v);
741 return 0;
742 } catch (...) {
743 return handleAllExceptions(-1, ERR);
744 }
745 }
746
747 int32_t thermo_setState_SV(int32_t handle, double s, double v)
748 {
749 // method: virtual void ThermoPhase::setState_SV(double, double)
750 try {
751 ThermoPhaseCabinet::at(handle)->setState_SV(s, v);
752 return 0;
753 } catch (...) {
754 return handleAllExceptions(-1, ERR);
755 }
756 }
757
758 int32_t thermo_setState_SP(int32_t handle, double s, double p)
759 {
760 // method: virtual void ThermoPhase::setState_SP(double, double)
761 try {
762 ThermoPhaseCabinet::at(handle)->setState_SP(s, p);
763 return 0;
764 } catch (...) {
765 return handleAllExceptions(-1, ERR);
766 }
767 }
768
769 int32_t thermo_setState_ST(int32_t handle, double s, double t)
770 {
771 // method: virtual void ThermoPhase::setState_ST(double, double)
772 try {
773 ThermoPhaseCabinet::at(handle)->setState_ST(s, t);
774 return 0;
775 } catch (...) {
776 return handleAllExceptions(-1, ERR);
777 }
778 }
779
780 int32_t thermo_setState_TV(int32_t handle, double t, double v)
781 {
782 // method: virtual void ThermoPhase::setState_TV(double, double)
783 try {
784 ThermoPhaseCabinet::at(handle)->setState_TV(t, v);
785 return 0;
786 } catch (...) {
787 return handleAllExceptions(-1, ERR);
788 }
789 }
790
791 int32_t thermo_setState_PV(int32_t handle, double p, double v)
792 {
793 // method: virtual void ThermoPhase::setState_PV(double, double)
794 try {
795 ThermoPhaseCabinet::at(handle)->setState_PV(p, v);
796 return 0;
797 } catch (...) {
798 return handleAllExceptions(-1, ERR);
799 }
800 }
801
802 int32_t thermo_setState_UP(int32_t handle, double u, double p)
803 {
804 // method: virtual void ThermoPhase::setState_UP(double, double)
805 try {
806 ThermoPhaseCabinet::at(handle)->setState_UP(u, p);
807 return 0;
808 } catch (...) {
809 return handleAllExceptions(-1, ERR);
810 }
811 }
812
813 int32_t thermo_setState_VH(int32_t handle, double v, double h)
814 {
815 // method: virtual void ThermoPhase::setState_VH(double, double)
816 try {
817 ThermoPhaseCabinet::at(handle)->setState_VH(v, h);
818 return 0;
819 } catch (...) {
820 return handleAllExceptions(-1, ERR);
821 }
822 }
823
824 int32_t thermo_setState_TH(int32_t handle, double t, double h)
825 {
826 // method: virtual void ThermoPhase::setState_TH(double, double)
827 try {
828 ThermoPhaseCabinet::at(handle)->setState_TH(t, h);
829 return 0;
830 } catch (...) {
831 return handleAllExceptions(-1, ERR);
832 }
833 }
834
835 int32_t thermo_setState_SH(int32_t handle, double s, double h)
836 {
837 // method: virtual void ThermoPhase::setState_SH(double, double)
838 try {
839 ThermoPhaseCabinet::at(handle)->setState_SH(s, h);
840 return 0;
841 } catch (...) {
842 return handleAllExceptions(-1, ERR);
843 }
844 }
845
846 int32_t thermo_equilibrate(int32_t handle, const char* XY, const char* solver, double rtol, int32_t max_steps, int32_t max_iter, int32_t estimate_equil)
847 {
848 // method: void ThermoPhase::equilibrate(const string&, const string&, double, int, int, int)
849 try {
850 ThermoPhaseCabinet::at(handle)->equilibrate(XY, solver, rtol, max_steps, max_iter, estimate_equil);
851 return 0;
852 } catch (...) {
853 return handleAllExceptions(-1, ERR);
854 }
855 }
856
857 double thermo_critTemperature(int32_t handle)
858 {
859 // getter: virtual double ThermoPhase::critTemperature()
860 try {
861 return ThermoPhaseCabinet::at(handle)->critTemperature();
862 } catch (...) {
863 return handleAllExceptions(DERR, DERR);
864 }
865 }
866
867 double thermo_critPressure(int32_t handle)
868 {
869 // getter: virtual double ThermoPhase::critPressure()
870 try {
871 return ThermoPhaseCabinet::at(handle)->critPressure();
872 } catch (...) {
873 return handleAllExceptions(DERR, DERR);
874 }
875 }
876
877 double thermo_critDensity(int32_t handle)
878 {
879 // getter: virtual double ThermoPhase::critDensity()
880 try {
881 return ThermoPhaseCabinet::at(handle)->critDensity();
882 } catch (...) {
883 return handleAllExceptions(DERR, DERR);
884 }
885 }
886
887 double thermo_vaporFraction(int32_t handle)
888 {
889 // getter: virtual double ThermoPhase::vaporFraction()
890 try {
891 return ThermoPhaseCabinet::at(handle)->vaporFraction();
892 } catch (...) {
893 return handleAllExceptions(DERR, DERR);
894 }
895 }
896
897 double thermo_satTemperature(int32_t handle, double p)
898 {
899 // method: virtual double ThermoPhase::satTemperature(double)
900 try {
901 return ThermoPhaseCabinet::at(handle)->satTemperature(p);
902 } catch (...) {
903 return handleAllExceptions(DERR, DERR);
904 }
905 }
906
907 double thermo_satPressure(int32_t handle, double t)
908 {
909 // method: virtual double ThermoPhase::satPressure(double)
910 try {
911 return ThermoPhaseCabinet::at(handle)->satPressure(t);
912 } catch (...) {
913 return handleAllExceptions(DERR, DERR);
914 }
915 }
916
917 int32_t thermo_setState_Psat(int32_t handle, double p, double x)
918 {
919 // method: virtual void ThermoPhase::setState_Psat(double, double)
920 try {
921 ThermoPhaseCabinet::at(handle)->setState_Psat(p, x);
922 return 0;
923 } catch (...) {
924 return handleAllExceptions(-1, ERR);
925 }
926 }
927
928 int32_t thermo_setState_Tsat(int32_t handle, double t, double x)
929 {
930 // method: virtual void ThermoPhase::setState_Tsat(double, double)
931 try {
932 ThermoPhaseCabinet::at(handle)->setState_Tsat(t, x);
933 return 0;
934 } catch (...) {
935 return handleAllExceptions(-1, ERR);
936 }
937 }
938
939 int32_t surf_getCoverages(int32_t handle, int32_t thetaLen, double* theta)
940 {
941 // getter: void SurfPhase::getCoverages(double*)
942 try {
943 auto obj = ThermoPhaseCabinet::as<SurfPhase>(handle);
944 // no size checking specified
945 obj->getCoverages(theta);
946 return 0;
947 } catch (...) {
948 return handleAllExceptions(-1, ERR);
949 }
950 }
951
952 int32_t surf_setCoverages(int32_t handle, int32_t thetaLen, const double* theta)
953 {
954 // setter: void SurfPhase::setCoverages(const double*)
955 try {
956 auto obj = ThermoPhaseCabinet::as<SurfPhase>(handle);
957 // no size checking specified
958 obj->setCoverages(theta);
959 return 0;
960 } catch (...) {
961 return handleAllExceptions(-1, ERR);
962 }
963 }
964
965 int32_t thermo_getConcentrations(int32_t handle, int32_t cLen, double* c)
966 {
967 // getter: virtual void Phase::getConcentrations(double* const)
968 try {
969 auto obj = ThermoPhaseCabinet::as<Phase>(handle);
970 // no size checking specified
971 obj->getConcentrations(c);
972 return 0;
973 } catch (...) {
974 return handleAllExceptions(-1, ERR);
975 }
976 }
977
978 int32_t thermo_setConcentrations(int32_t handle, int32_t concLen, const double* conc)
979 {
980 // setter: virtual void Phase::setConcentrations(const double* const)
981 try {
982 auto obj = ThermoPhaseCabinet::as<Phase>(handle);
983 // no size checking specified
984 obj->setConcentrations(conc);
985 return 0;
986 } catch (...) {
987 return handleAllExceptions(-1, ERR);
988 }
989 }
990
991 double surf_siteDensity(int32_t handle)
992 {
993 // getter: double SurfPhase::siteDensity()
994 try {
995 return ThermoPhaseCabinet::as<SurfPhase>(handle)->siteDensity();
996 } catch (...) {
997 return handleAllExceptions(DERR, DERR);
998 }
999 }
1000
1001 int32_t surf_setSiteDensity(int32_t handle, double n0)
1002 {
1003 // setter: void SurfPhase::setSiteDensity(double)
1004 try {
1005 ThermoPhaseCabinet::as<SurfPhase>(handle)->setSiteDensity(n0);
1006 return 0;
1007 } catch (...) {
1008 return handleAllExceptions(-1, ERR);
1009 }
1010 }
1011
1012 int32_t surf_setCoveragesByName(int32_t handle, const char* cov)
1013 {
1014 // setter: void SurfPhase::setCoveragesByName(const string&)
1015 try {
1016 ThermoPhaseCabinet::as<SurfPhase>(handle)->setCoveragesByName(cov);
1017 return 0;
1018 } catch (...) {
1019 return handleAllExceptions(-1, ERR);
1020 }
1021 }
1022
1023 int32_t thermo_report(int32_t handle, int32_t show_thermo, double threshold, int32_t bufLen, char* buf)
1024 {
1025 // method: virtual string ThermoPhase::report(bool, double)
1026 try {
1027 bool show_thermo_ = (show_thermo != 0);
1028 string out = ThermoPhaseCabinet::at(handle)->report(show_thermo_, threshold);
1029 copyString(out, buf, bufLen);
1030 return int(out.size()) + 1;
1031 } catch (...) {
1032 return handleAllExceptions(-1, ERR);
1033 }
1034 }
1035
1036 int32_t thermo_print(int32_t handle, int32_t showThermo, double threshold)
1037 {
1038 // method: custom code
1039 try {
1040 // *************** begin custom code ***************
1041 bool show = (showThermo != 0);
1042 writelog(ThermoPhaseCabinet::at(handle)->report(show, threshold));
1043 return 0;
1044 // **************** end custom code ****************
1045 } catch (...) {
1046 return handleAllExceptions(-1, ERR);
1047 }
1048 }
1049
1050 int32_t thermo_del(int32_t handle)
1051 {
1052 // destructor
1053 try {
1054 ThermoPhaseCabinet::del(handle);
1055 return 0;
1056 } catch (...) {
1057 return handleAllExceptions(-1, ERR);
1058 }
1059 }
1060
1062 {
1063 // reserved CLib function: custom code
1064 try {
1065 // *************** begin custom code ***************
1066 return ThermoPhaseCabinet::size();
1067 // **************** end custom code ****************
1068 } catch (...) {
1069 return handleAllExceptions(-1, ERR);
1070 }
1071 }
1072
1073} // extern "C"
Header for a simple thermodynamics model of a surface phase derived from ThermoPhase,...
Headers for the factory class that can create known ThermoPhase objects (see Thermodynamic Properties...
Array size error.
Template for classes to hold pointers to objects.
Definition Cabinet.h:51
CTTHERMO - Generated CLib Cantera interface library.
double thermo_satTemperature(int32_t handle, double p)
Return the saturation temperature given the pressure.
Definition ctthermo.cpp:897
int32_t thermo_setState_VH(int32_t handle, double v, double h)
Set the specific volume (m^3/kg) and the specific enthalpy (J/kg)
Definition ctthermo.cpp:813
int32_t surf_setCoveragesByName(int32_t handle, const char *cov)
Set the coverages from a string of colon-separated name:value pairs.
int32_t thermo_speciesIndex(int32_t handle, const char *name)
Returns the index of a species named 'name' within the Phase object.
Definition ctthermo.cpp:358
int32_t thermo_speciesName(int32_t handle, int32_t k, int32_t bufLen, char *buf)
Name of the species with index k.
Definition ctthermo.cpp:336
double thermo_cv_mole(int32_t handle)
Molar heat capacity at constant volume.
Definition ctthermo.cpp:518
int32_t thermo_setState_TD(int32_t handle, double t, double rho)
Set the internally stored temperature (K) and density (kg/m^3)
Definition ctthermo.cpp:703
double thermo_intEnergy_mass(int32_t handle)
Specific internal energy.
Definition ctthermo.cpp:468
int32_t thermo_getConcentrations(int32_t handle, int32_t cLen, double *c)
Get the species concentrations (kmol/m^3).
Definition ctthermo.cpp:965
int32_t thermo_getMoleFractions(int32_t handle, int32_t xLen, double *x)
Get the species mole fraction vector.
Definition ctthermo.cpp:196
int32_t surf_setCoverages(int32_t handle, int32_t thetaLen, const double *theta)
Set the surface site fractions to a specified state.
Definition ctthermo.cpp:952
int32_t thermo_print(int32_t handle, int32_t showThermo, double threshold)
Print a summary of the state of the phase to the logger.
double thermo_cp_mass(int32_t handle)
Specific heat at constant pressure.
Definition ctthermo.cpp:508
int32_t thermo_setMassFractions(int32_t handle, int32_t yLen, const double *y)
Set the mass fractions to the specified values and normalize them.
Definition ctthermo.cpp:241
int32_t thermo_setState_ST(int32_t handle, double s, double t)
Set the specific entropy (J/kg/K) and temperature (K).
Definition ctthermo.cpp:769
int32_t thermo_setTemperature(int32_t handle, double temp)
Set the internally stored temperature of the phase (K).
Definition ctthermo.cpp:103
double thermo_maxTemp(int32_t handle, int32_t k)
Maximum temperature for which the thermodynamic data for the species are valid.
Definition ctthermo.cpp:408
double thermo_pressure(int32_t handle)
Return the thermodynamic pressure (Pa).
Definition ctthermo.cpp:114
double thermo_density(int32_t handle)
Density (kg/m^3).
Definition ctthermo.cpp:135
int32_t thermo_getElectrochemPotentials(int32_t handle, int32_t muLen, double *mu)
Get the species electrochemical potentials.
Definition ctthermo.cpp:551
double thermo_enthalpy_mole(int32_t handle)
Molar enthalpy.
Definition ctthermo.cpp:418
int32_t thermo_setState_SH(int32_t handle, double s, double h)
Set the specific entropy (J/kg/K) and the specific enthalpy (J/kg)
Definition ctthermo.cpp:835
int32_t thermo_setMoleFractionsByName(int32_t handle, const char *x)
Set the mole fractions of a group of species by name.
Definition ctthermo.cpp:256
double thermo_cv_mass(int32_t handle)
Specific heat at constant volume.
Definition ctthermo.cpp:528
int32_t thermo_report(int32_t handle, int32_t show_thermo, double threshold, int32_t bufLen, char *buf)
returns a summary of the state of the phase as a string
int32_t thermo_setState_TH(int32_t handle, double t, double h)
Set the temperature (K) and the specific enthalpy (J/kg)
Definition ctthermo.cpp:824
int32_t thermo_del(int32_t handle)
Delete ThermoPhase object.
int32_t thermo_setState_SP(int32_t handle, double s, double p)
Set the specific entropy (J/kg/K) and pressure (Pa).
Definition ctthermo.cpp:758
int32_t thermo_setState_TV(int32_t handle, double t, double v)
Set the temperature (K) and specific volume (m^3/kg).
Definition ctthermo.cpp:780
double thermo_vaporFraction(int32_t handle)
Return the fraction of vapor at the current conditions.
Definition ctthermo.cpp:887
int32_t thermo_addElement(int32_t handle, const char *symbol, double weight, int32_t atomicNumber, double entropy298, int32_t elem_type)
Add an element.
Definition ctthermo.cpp:378
int32_t thermo_getPartialMolarIntEnergies(int32_t handle, int32_t ubarLen, double *ubar)
Return an array of partial molar internal energies for the species in the mixture.
Definition ctthermo.cpp:631
double thermo_massFraction(int32_t handle, int32_t k)
Return the mass fraction of a single species.
Definition ctthermo.cpp:186
double thermo_gibbs_mole(int32_t handle)
Molar Gibbs function.
Definition ctthermo.cpp:478
int32_t surf_getCoverages(int32_t handle, int32_t thetaLen, double *theta)
Return a vector of surface coverages.
Definition ctthermo.cpp:939
double thermo_critDensity(int32_t handle)
Critical density (kg/m3).
Definition ctthermo.cpp:877
int32_t thermo_nElements(int32_t handle)
Number of elements.
Definition ctthermo.cpp:73
double thermo_meanMolecularWeight(int32_t handle)
The mean molecular weight.
Definition ctthermo.cpp:166
int32_t thermo_setState_Tsat(int32_t handle, double t, double x)
Set the state to a saturated system at a particular temperature.
Definition ctthermo.cpp:928
int32_t thermo_setState_PV(int32_t handle, double p, double v)
Set the pressure (Pa) and specific volume (m^3/kg).
Definition ctthermo.cpp:791
double thermo_enthalpy_mass(int32_t handle)
Specific enthalpy.
Definition ctthermo.cpp:428
int32_t thermo_elementIndex(int32_t handle, const char *name)
Return the index of element named 'name'.
Definition ctthermo.cpp:348
int32_t thermo_type(int32_t handle, int32_t bufLen, char *buf)
String indicating the thermodynamic model implemented.
Definition ctthermo.cpp:61
int32_t thermo_nSpecies(int32_t handle)
Returns the number of species in the phase.
Definition ctthermo.cpp:83
double surf_siteDensity(int32_t handle)
Returns the site density.
Definition ctthermo.cpp:991
double thermo_entropy_mass(int32_t handle)
Specific entropy.
Definition ctthermo.cpp:448
int32_t thermo_setName(int32_t handle, const char *nm)
Sets the string name for the phase.
Definition ctthermo.cpp:50
int32_t thermo_getCharges(int32_t handle, int32_t chargesLen, double *charges)
Copy the vector of species charges into array charges.
Definition ctthermo.cpp:309
int32_t thermo_setState_HP(int32_t handle, double h, double p)
Set the internally stored specific enthalpy (J/kg) and pressure (Pa) of the phase.
Definition ctthermo.cpp:725
int32_t thermo_setState_TPY(int32_t handle, double t, double p, int32_t yLen, const double *y)
Set the internally stored temperature (K), pressure (Pa), and mass fractions of the phase.
Definition ctthermo.cpp:681
int32_t thermo_equilibrate(int32_t handle, const char *XY, const char *solver, double rtol, int32_t max_steps, int32_t max_iter, int32_t estimate_equil)
Equilibrate a ThermoPhase object.
Definition ctthermo.cpp:846
double thermo_intEnergy_mole(int32_t handle)
Molar internal energy.
Definition ctthermo.cpp:458
double thermo_critTemperature(int32_t handle)
Critical temperature (K).
Definition ctthermo.cpp:857
int32_t thermo_name(int32_t handle, int32_t bufLen, char *buf)
Return the name of the phase.
Definition ctthermo.cpp:38
int32_t thermo_setState_TPX(int32_t handle, double t, double p, int32_t xLen, const double *x)
Set the temperature (K), pressure (Pa), and mole fractions.
Definition ctthermo.cpp:670
int32_t thermo_getChemPotentials(int32_t handle, int32_t muLen, double *mu)
Get the species chemical potentials.
Definition ctthermo.cpp:538
double thermo_electricPotential(int32_t handle)
Returns the electric potential of this phase (V).
Definition ctthermo.cpp:564
int32_t thermo_getPartialMolarEnthalpies(int32_t handle, int32_t hbarLen, double *hbar)
Returns an array of partial molar enthalpies for the species in the mixture.
Definition ctthermo.cpp:605
int32_t thermo_setState_Psat(int32_t handle, double p, double x)
Set the state to a saturated system at a particular pressure.
Definition ctthermo.cpp:917
double thermo_refPressure(int32_t handle)
Returns the reference pressure in Pa.
Definition ctthermo.cpp:388
int32_t thermo_cabinetSize()
Return size of ThermoPhase storage.
double thermo_isothermalCompressibility(int32_t handle)
Returns the isothermal compressibility.
Definition ctthermo.cpp:595
int32_t thermo_setPressure(int32_t handle, double p)
Set the internally stored pressure (Pa) at constant temperature and composition.
Definition ctthermo.cpp:124
double thermo_gibbs_mass(int32_t handle)
Specific Gibbs function.
Definition ctthermo.cpp:488
double thermo_moleFraction(int32_t handle, int32_t k)
Return the mole fraction of a single species.
Definition ctthermo.cpp:176
int32_t thermo_getPartialMolarCp(int32_t handle, int32_t cpbarLen, double *cpbar)
Return an array of partial molar heat capacities for the species in the mixture.
Definition ctthermo.cpp:644
int32_t thermo_setState_UP(int32_t handle, double u, double p)
Set the specific internal energy (J/kg) and pressure (Pa).
Definition ctthermo.cpp:802
double thermo_molarDensity(int32_t handle)
Molar density (kmol/m^3).
Definition ctthermo.cpp:156
double thermo_minTemp(int32_t handle, int32_t k)
Minimum temperature for which the thermodynamic data for the species or phase are valid.
Definition ctthermo.cpp:398
int32_t thermo_setMassFractionsByName(int32_t handle, const char *x)
Set the species mass fractions by name.
Definition ctthermo.cpp:267
double thermo_satPressure(int32_t handle, double t)
Return the saturation pressure given the temperature.
Definition ctthermo.cpp:907
int32_t thermo_getPartialMolarVolumes(int32_t handle, int32_t vbarLen, double *vbar)
Return an array of partial molar volumes for the species in the mixture.
Definition ctthermo.cpp:657
double thermo_thermalExpansionCoeff(int32_t handle)
Return the volumetric thermal expansion coefficient.
Definition ctthermo.cpp:585
int32_t thermo_setState_DP(int32_t handle, double rho, double p)
Set the density (kg/m**3) and pressure (Pa) at constant composition.
Definition ctthermo.cpp:714
int32_t thermo_setState_TP(int32_t handle, double t, double p)
Set the temperature (K) and pressure (Pa)
Definition ctthermo.cpp:692
double thermo_critPressure(int32_t handle)
Critical pressure (Pa).
Definition ctthermo.cpp:867
int32_t thermo_atomicWeights(int32_t handle, int32_t bufLen, double *buf)
Return a read-only reference to the vector of atomic weights.
Definition ctthermo.cpp:278
int32_t thermo_setMoleFractions(int32_t handle, int32_t xLen, const double *x)
Set the mole fractions to the specified values.
Definition ctthermo.cpp:226
int32_t thermo_getMassFractions(int32_t handle, int32_t yLen, double *y)
Get the species mass fractions.
Definition ctthermo.cpp:211
int32_t thermo_elementName(int32_t handle, int32_t m, int32_t bufLen, char *buf)
Name of the element with index m.
Definition ctthermo.cpp:324
double thermo_temperature(int32_t handle)
Temperature (K).
Definition ctthermo.cpp:93
double thermo_cp_mole(int32_t handle)
Molar heat capacity at constant pressure.
Definition ctthermo.cpp:498
int32_t thermo_setDensity(int32_t handle, const double density_)
Set the internally stored density (kg/m^3) of the phase.
Definition ctthermo.cpp:145
int32_t thermo_getMolecularWeights(int32_t handle, int32_t weightsLen, double *weights)
Copy the vector of molecular weights into array weights.
Definition ctthermo.cpp:294
int32_t surf_setSiteDensity(int32_t handle, double n0)
Set the site density of the surface phase (kmol m-2)
int32_t thermo_getPartialMolarEntropies(int32_t handle, int32_t sbarLen, double *sbar)
Returns an array of partial molar entropies of the species in the solution.
Definition ctthermo.cpp:618
double thermo_entropy_mole(int32_t handle)
Molar entropy.
Definition ctthermo.cpp:438
int32_t thermo_setElectricPotential(int32_t handle, double v)
Set the electric potential of this phase (V).
Definition ctthermo.cpp:574
int32_t thermo_setState_UV(int32_t handle, double u, double v)
Set the specific internal energy (J/kg) and specific volume (m^3/kg).
Definition ctthermo.cpp:736
int32_t thermo_setConcentrations(int32_t handle, int32_t concLen, const double *conc)
Set the concentrations to the specified values within the phase.
Definition ctthermo.cpp:978
int32_t thermo_setState_SV(int32_t handle, double s, double v)
Set the specific entropy (J/kg/K) and specific volume (m^3/kg).
Definition ctthermo.cpp:747
double thermo_nAtoms(int32_t handle, int32_t k, int32_t m)
Number of atoms of element m in species k.
Definition ctthermo.cpp:368
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.
void writelog(const string &fmt, const Args &... args)
Write a formatted message to the screen.
Definition global.h:176
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.