9 std::string get_cantera_version()
11 return std::string(CANTERA_VERSION);
14 int get_sundials_version()
16 return SUNDIALS_VERSION;
22 virtual void write(
const std::string& s) {
24 static const size_t N = 999;
25 for (
size_t i = 0; i < s.size(); i+=N) {
26 PySys_WriteStdout(
"%s", s.substr(i, N).c_str());
31 PySys_WriteStdout(
"%s",
"\n");
34 virtual void error(
const std::string& msg) {
35 std::string err =
"raise Exception('''"+msg+
"''')";
36 PyRun_SimpleString(err.c_str());
42 void CxxArray2D_set(
Cantera::Array2D& array,
size_t i,
size_t j,
double value)
48 #define ARRAY_FUNC(PREFIX, CLASS_NAME, FUNC_NAME) \
49 void PREFIX ## _ ## FUNC_NAME(Cantera::CLASS_NAME* object, double* data) \
50 { object->FUNC_NAME(data); }
53 #define ARRAY_FUNC2(PREFIX, CLASS_NAME, FUNC_NAME) \
54 void PREFIX ## _ ## FUNC_NAME(Cantera::CLASS_NAME* object, size_t dim, double* data) \
55 { object->FUNC_NAME(dim, data); }
58 #define THERMO_1D(FUNC_NAME) ARRAY_FUNC(thermo, ThermoPhase, FUNC_NAME)
59 #define KIN_1D(FUNC_NAME) ARRAY_FUNC(kin, Kinetics, FUNC_NAME)
60 #define TRANSPORT_1D(FUNC_NAME) ARRAY_FUNC(tran, Transport, FUNC_NAME)
61 #define TRANSPORT_2D(FUNC_NAME) ARRAY_FUNC2(tran, Transport, FUNC_NAME)
63 THERMO_1D(getMassFractions)
64 THERMO_1D(setMassFractions)
65 THERMO_1D(getMoleFractions)
66 THERMO_1D(setMoleFractions)
67 THERMO_1D(getConcentrations)
68 THERMO_1D(setConcentrations)
70 THERMO_1D(getMolecularWeights)
71 THERMO_1D(getChemPotentials)
72 THERMO_1D(getElectrochemPotentials)
73 THERMO_1D(getPartialMolarEnthalpies)
74 THERMO_1D(getPartialMolarEntropies)
75 THERMO_1D(getPartialMolarIntEnergies)
76 THERMO_1D(getPartialMolarCp)
77 THERMO_1D(getPartialMolarVolumes)
78 THERMO_1D(getEnthalpy_RT)
79 THERMO_1D(getEntropy_R)
80 THERMO_1D(getIntEnergy_RT)
81 THERMO_1D(getGibbs_RT)
84 KIN_1D(getFwdRatesOfProgress)
85 KIN_1D(getRevRatesOfProgress)
86 KIN_1D(getNetRatesOfProgress)
88 KIN_1D(getEquilibriumConstants)
89 KIN_1D(getFwdRateConstants)
90 KIN_1D(getRevRateConstants)
92 KIN_1D(getDeltaEnthalpy)
94 KIN_1D(getDeltaEntropy)
95 KIN_1D(getDeltaSSEnthalpy)
96 KIN_1D(getDeltaSSGibbs)
97 KIN_1D(getDeltaSSEntropy)
99 KIN_1D(getCreationRates)
100 KIN_1D(getDestructionRates)
101 KIN_1D(getNetProductionRates)
103 TRANSPORT_1D(getMixDiffCoeffs)
104 TRANSPORT_1D(getMixDiffCoeffsMass)
105 TRANSPORT_1D(getMixDiffCoeffsMole)
106 TRANSPORT_1D(getThermalDiffCoeffs)
108 TRANSPORT_2D(getMultiDiffCoeffs)
109 TRANSPORT_2D(getBinaryDiffCoeffs)
Base class for 'loggers' that write text messages to log files.
virtual void write(const std::string &msg)
Write a log message.
Headers for the Transport object, which is the virtual base class for all transport property evaluato...
virtual void error(const std::string &msg)
Write an error message and quit.
A class for 2D arrays stored in column-major (Fortran-compatible) form.
Base class for kinetics managers and also contains the kineticsmgr module documentation (see Kinetics...
Header for Base class for 'loggers' that write text messages to log files (see Writing messages to th...
virtual void writeendl()
Write an end of line character and flush output.
Header file for class ThermoPhase, the base class for phases with thermodynamic properties, and the text for the Module thermoprops (see Thermodynamic Properties and class ThermoPhase).