Commit graph

5780 commits

Author SHA1 Message Date
Ray Speth
71bb73b728 Eliminate unnecessary calles to std::string.c_str() 2015-10-14 18:45:22 -04:00
Ray Speth
e669f912a5 Use cppformat in Phase and ThermoPhase 2015-10-14 18:45:22 -04:00
Ray Speth
745db409a6 Add a constructor for CanteraError that uses format strings 2015-10-14 18:45:22 -04:00
Ray Speth
16143b47b6 Replace most uses of sprintf with cppformat 2015-10-14 18:45:22 -04:00
Ray Speth
1411419b0f [1D] Eliminate sprintf-style string formatting 2015-10-14 18:45:22 -04:00
Ray Speth
59b14724ed Allow writelog to do string formatting
If multiple arguments are supplied, the string is treated as a Python-style
format string and the extra arguments are used to populate the format string.
2015-10-14 18:45:22 -04:00
Ray Speth
41527b1ea7 Rename two-argument version of writelog 'debuglog'
This is a prerequisite to allowing writelog to take an arbitrary number
of arguments.
2015-10-14 18:45:22 -04:00
Ray Speth
0daf89c7d3 [Doc] Update checkout instructions to handle git submodules 2015-10-14 18:45:22 -04:00
Ray Speth
61a755ff51 Use cppformat to implement writelogf
This represents the first use of variadic templates in Cantera.
2015-10-14 18:45:22 -04:00
Ray Speth
61c522d7a7 Set compiler options to enable C++11 2015-10-14 18:45:22 -04:00
Ray Speth
caf9c6f062 Use cppformat in ThermoPhase::report and overrides 2015-10-14 18:45:22 -04:00
Ray Speth
952ed7d39a Compile cppformat and include it in the Cantera library 2015-10-14 18:45:22 -04:00
Ray Speth
6e34ef025f Add cppformat submodule 2015-10-14 18:45:22 -04:00
Ray Speth
dcfcb528b8 [Doc/Reactor] Improve description for wall heat transfer terms 2015-10-14 18:08:13 -04:00
Ray Speth
f92e4b5f3c [Doc] Add link to guidelines for creating good examples for bug reports 2015-10-14 17:10:19 -04:00
Ray Speth
8591a7ee5c [Python] Fix handling of bad input to 'stringify'
Cases where a string is required but a non-string is provided will now generate
an exception instead of substituting the empty string.
2015-10-14 12:58:08 -04:00
Ray Speth
512dffe859 [Test] Fix csv test comparisons to work with Numpy 1.10
Drop support for Numpy 1.3 (which lacks the skip_header argument to genfromtxt).
2015-10-08 13:20:07 -04:00
Ray Speth
fbf93bf270 [Doc] Add Doxygen docstrings for wrapper classes
Without at least a basic docstring, these classes are excluded from the Doxygen
documentation.
2015-10-07 13:54:47 -04:00
Ray Speth
3914ede44a [Test/Python] Fix warnings about unclosed files 2015-10-07 12:59:46 -04:00
Ray Speth
58110351af [Test] Fix deprecation warnings in Python tests
This also fixes support for Numpy 1.10, which removes the 'skiprows' keyword.
2015-10-07 12:59:27 -04:00
Ray Speth
92d3ba0bf7 [Test] Enable DeprecationWarning in Python test suite 2015-10-07 11:45:55 -04:00
Ray Speth
3d27dfa1a1 [Reactor] Eliminate unused variable ReactorNet::m_iown 2015-10-05 18:48:14 -04:00
Ray Speth
a956f3904a [Thermo] Deprecate get/setReferenceComposition and xMol_Ref 2015-10-05 15:25:05 -04:00
Ray Speth
5926d2db7c [ck2cti] Handle reactions containing 'hv' pseudospecies
Convert to an irreversible reaction and ignore the photon.
2015-10-05 14:59:35 -04:00
Ray Speth
b38a9332e2 Treat duplicate keys in composition strings as errors
For example, 'H2:0.5, O2:0.5, H2:0.1', which would previously have been treated
as equivalent to 'O2:0.5, H2:0.1'.
2015-10-05 13:02:16 -04:00
Ray Speth
0e4b0cba0f [Matlab] Fix error handling for nAtoms to avoid false positives
Species can have negative "atoms" of an "element" in the case where the element
is an electron and the species is a positive ion.
2015-09-08 12:26:58 -04:00
Ray Speth
54a71b8f68 Remove unused exp3to2 script 2015-09-08 12:26:58 -04:00
Ray Speth
5ed6d9a2af [Test] Fix compilation errors with VS2015 2015-09-08 12:26:58 -04:00
Ray Speth
67172cd478 [Test] Disable problematic test with old CVODE 2015-09-08 12:26:55 -04:00
Ray Speth
567a854377 Fix a compilation error when using '-std=c++11' 2015-09-04 18:37:55 -04:00
Ray Speth
d69daab39f [Test] Fix error in test comparison when numbers disappear 2015-09-04 18:37:43 -04:00
Ray Speth
62730b1ff7 Remove unimplemented derivative calculation functions 2015-08-28 15:51:13 -04:00
Ray Speth
ab4add0ba2 Cantera does not write temporary files 2015-08-27 23:38:55 -04:00
Ray Speth
a77b79b00c [Python] Check for compatibility before adding Quantities 2015-08-24 17:31:04 -04:00
Ray Speth
25b1dc90f2 [Python] Set default constant property pair in Quantity.equilibrate 2015-08-24 17:31:04 -04:00
Ray Speth
8299646059 [Python] Add example demonstrating use of class Quantity 2015-08-24 17:31:04 -04:00
Ray Speth
032537710f [Python] Quantity.equilibrate updates the Quantity's state 2015-08-24 17:31:04 -04:00
Ray Speth
d559af9d38 [Python] Add docs for class Quantity 2015-08-24 17:31:04 -04:00
Ray Speth
94f94dd0e6 [Python] Basic implementation of class Quantity 2015-08-24 17:31:04 -04:00
Ray Speth
6e138d0ae4 [Reactor] Always check that input/output are finite
This causes problems to be caught early, where they can at least sometimes be
handled as recoverable intergrator errors, rather than letting NaN values
propagate through the solution.
2015-08-24 12:27:07 -04:00
Ray Speth
86835a5eeb [Thermo] Show large negative species concentrations in phase report
Non-trivial negative concentrations generally indicate a problem, and shouldn't
be hidden.
2015-08-23 19:35:23 -04:00
Ray Speth
60b98b362c [Kinetics] Prevent positive feedback in negative species concentrations
For binary (or higher order) reactions, multiple negative (but small, i.e. with
respect to integration tolerances) species concentrations should not produce
positive reaction rates that would drive those concentrations to even more
negative values.
2015-08-23 19:29:49 -04:00
Ray Speth
bb2d1c0993 [Thermo] Prevent setting thermodynamic state variables to NaN
Throwing an exception when a state variable is being set to NaN transforms some
reactor network integration errors from unrecoverable errors into recoverable
errors.
2015-08-23 17:09:17 -04:00
Ray Speth
2b7bcf2b3e [Python] Prevent renaming of Python extension module
In Cygwin, some versions of SCons append a 'cyg' prefix to DLL names, which
breaks the Python extension module that is supposed to be named just
'_cantera.dll'.
2015-08-13 22:22:33 -04:00
Ray Speth
7bcbbaafd9 [Thermo] Use consistent implementation for convenience constructors
The constructor with the signature (inputFile, [id]) just calls initThermoFile.
The constructor with the signature (phase XML node, [id]) just calls importPhase
(note that the id argument is unused, since the correct XML node must already be
given).
2015-08-05 12:34:22 -04:00
Ray Speth
7fe8f0f3b7 [Thermo] Refactor common initialization out of constructors 2015-08-05 12:09:02 -04:00
Ray Speth
ff60328ecd [Thermo] Fix IdealGasPhase constructor from XML_Node 2015-08-04 12:01:45 -04:00
Ray Speth
78412b3d72 Increase number of points used in multiprocessing example
This helps average out some performance variability to make the effect of
multiprocessing more clear.
2015-08-03 23:15:07 -04:00
Ray Speth
6514f7a8e1 Fix multiprocessing example when using Python 3
In Python 3, 'map' returns an object which evalutes the function as it is
consumed, not when 'map' is called. Therefore, the correct comparison to
pool.map(...) is list(map(...)).
2015-08-03 23:00:54 -04:00
Ray Speth
7ca9327f7d Fix multiprocessing example to actually get the indicated property 2015-08-03 22:57:03 -04:00