Commit graph

355 commits

Author SHA1 Message Date
Ray Speth
f9fa476c39 [MixMaster] Fix crash when using Tcl 8.6
Tcl/Tk changed some operations which previously resulted in undefined behavior
into errors, including one case that occurred when updating the "Mixtures" menu
in MixMaster.

MixMaster now modifies the existing Menu when adding an item, rather than
completely regenerating it, which avoids this problem.

Cherry-pick of trunk r3162.
2014-09-15 18:06:18 +00:00
Ray Speth
3eb6cb0f9d [SCons] Fix build errors when path to Python contains spaces
Adaptation of trunk r3075.
2014-09-12 20:22:18 +00:00
Ray Speth
17c89f8237 Allow auto conversion of Python examples on Windows
3to2 cannot be called as an executable on Windows, but it can be called
as a script. Assume that the 3to2 script is installed in
PYTHONROOT\Scripts, which is the default for installation by pip.

Cherry-pick of trunk r3113.
2014-09-10 22:33:09 +00:00
Ray Speth
66fb99f793 [ck2cti] Allow the case where a reaction section is specified but empty
Cherry-pick of trunk r3045.
2014-09-10 22:33:02 +00:00
Ray Speth
f8fa122a0d [Deb] Avoid packaging conflict with mixmaster 2014-06-25 21:05:29 +00:00
Ray Speth
925277a052 [Deb] Avoid packaging conflicts with ck2cti and ctml_writer 2014-06-25 20:36:58 +00:00
Ray Speth
c917291921 [Python] Allow Func1 to accept nearly-scalar types
This includes lists, tuples, and numpy arrays with a single element

Cherry-pick of trunk r3019.
2014-06-20 19:41:50 +00:00
Ray Speth
964f88fb0e [Python] Fix to conversion of samples from Python 3 to Python 2
Some calls to the print function weren't being converted to print statements
correctly by 3to2, so now we use the alternative fix, which is to use the
backported print function.

Fixes Issue 216.

Cherry-pick of trunk r2952.
2014-06-20 19:41:37 +00:00
Ray Speth
b1e05a05f2 [ck2cti] Relax formatting requirement for Chebyshev coefficients.
Allow coefficient data to begin on the same line as the declaration of the
order of the polynomial in each dimension.

Fixes Issue 219.

Cherry-pick of trunk r2937.
2014-06-20 19:41:25 +00:00
Ray Speth
d787349771 [ck2cti] Allow stoichiometric coefficients ending in decimal points
Cherry-pick of trunk r2936.
2014-06-20 19:41:22 +00:00
Ray Speth
b4779c4310 [SCons] Fix dependency resolution for some Python files
Cherry-pick of trunk r2935
2014-06-20 19:41:17 +00:00
Ray Speth
78c9c9c0a5 [CTI] Allow omitting third body in Chebyshev reaction equations
Cherry-pick of trunk r2930.
2014-06-20 19:41:14 +00:00
Ray Speth
aa8c73d252 [CTI] Relax formatting requirements for third bodies in reaction strings
Allow 'A + B (+M)' in addition to 'A + B (+ M)'

Cherry-pick of trunk r2929.
2014-06-20 19:41:10 +00:00
Ray Speth
e0f9888601 [ck2cti] Make 'PCHEB' and 'TCHEB' keywords case insensitive
Fixes Issue 213.

Cherry-pick of trunk r2878.
2014-04-29 19:02:38 +00:00
Ray Speth
e59ca5ff6b [ck2cti] Improve error messages associated with missing input files
Partial cherry-pick of trunk r2856.
2014-04-29 19:02:02 +00:00
Ray Speth
953fc46c27 Revert commit intended for trunk that ended up on 2.1 maintenance branch
Reverts r2879, which was actually commited to trunk in r2913.
2014-04-25 20:46:47 +00:00
Steven DeCaluwe
1d0a4711ac Added gas-phse kinetics to RedlichKwongMFTP class 2014-04-09 13:11:35 +00:00
Ray Speth
1b0519e662 [ctml_writer] Fix handling of units in some fields
When using Python 3, using -1 as the dummy value for density and site_density
causes probems, because the (ordered) comparison between a density specified
with units (as a tuple) and 0 is not allowed. Instead, use None as the
placeholder value.

Cherry-pick of trunk commit r2800.
2014-03-24 21:37:00 +00:00
Ray Speth
5795f3fd55 [Python] Fix docstring of Sim1D.restore
Resolves Issue 210.

Cherry-pick of trunk commit r2790.
2014-03-24 21:36:55 +00:00
Ray Speth
a3d0176087 [SCons] Ensure that 'compilerOpt' is always defined 2014-02-24 03:27:32 +00:00
Ray Speth
3b2c7d3ae2 [SCons] Fix simultaneous compilation of Python 2 and Python 3 modules
Use separate SCons Environments so the 'py_include_dirs' variable (which
contains the Numpy include directory) can be distinct for each Python module.

Cherry-pick of trunk r2710.
2014-02-14 17:02:25 +00:00
Ray Speth
261240e8f1 [MixMaster] Fixes to use Cython function names
DataFrame.importCSV and dataFrame.importData were still using function names
from the old Python module.

Cherry-pick of trunk r2729.
2014-02-14 17:02:21 +00:00
Ray Speth
659bceb9cf [MixMaster] Fix usage of numpy.zeros and numpy.ones
Cherry pick of trunk r2728.
2014-02-14 17:02:16 +00:00
Ray Speth
cc27095599 [ck2cti] Fix support for species names containing '+' and '='
This addesses a parsing error that would occur if a mechanism contained both
'foo' and 'foo+', where reactions written as 'foo+bar' would be parsed as a
reaction with 'foo+' and 'bar'.

See Issue 182.

Cherry pick of trunk commit r2701.
2014-02-03 17:04:48 +00:00
Ray Speth
0590c6c1a3 [ck2cti] Fix for support of unterminated thermo sections
Fixes the case where the next section header contains a modifier, e.g. 'thermo
all' or 'reactions <units>'.

Based on a patch provided by Bryan Weber.

See Issue 199.

Cherry-pick of trunk r2662.
2014-01-23 03:06:23 +00:00
Ray Speth
a23eac62d8 [ck2cti] Improve handling of duplicate species
Warn when a species is given multiple times in the input list. Do not add the
duplicate species to speciesList.

Based on patch provided by Bryan Weber.

Resolves Issue 199.

Cherry-pick of trunk r2660.
2014-01-23 03:06:16 +00:00
Ray Speth
f988382b36 [Matlab] Check for sparse arrays in the Solution 'set' function
Patch provided by Bryan Weber.

Resolves Issue 140.

Cherry-pick of trunk r2659.
2014-01-23 03:06:11 +00:00
Ray Speth
c865843d8a [Cython] Fix compilation issue when using Clang
Cherry-pick of trunk r2663.
2014-01-23 02:13:51 +00:00
Ray Speth
9f156c04fc [Thermo] Make modification of discontinuous NASA polynomials optional
Adding the attribute allow_discontinuities="true" to a phase's
'thermo' node (CTML) or adding 'allow_discontinuous_thermo' to a
phase's 'options' argument (CTI) will disable the automatic adjustment
of the provided polynomials so that enthalpy and entropy are
continuous at the midpoint temperature.

Cherry-pick of trunk r2590.
2014-01-23 02:12:36 +00:00
Ray Speth
5386d6b304 [ctml] Fix constructor for stoichiometric_solid phase
Error introduced in r2579
2013-12-06 23:45:22 +00:00
Ray Speth
81cf00260d [ck2cti] Add support for species names containing '+' and '=' 2013-12-06 23:15:24 +00:00
Ray Speth
44181d5edf [ck2cti/Test] Eliminate confusing messages from expected errors
Suppress error messages from tests of ck2cti that use bad input to
test that input validation is working correctly.
2013-12-06 23:15:21 +00:00
Ray Speth
c9b4d3dbe8 [ck2cti] Add support for truncated section header names
Accept truncated section names such as 'REAC' for 'REACTIONS' and
'ELEM' for 'ELEMENTS'.
2013-12-06 23:15:18 +00:00
Ray Speth
ff842a1a08 [Cython] Direct log output to sys.stdout
This fixes the problem of some output (notably from the 1D solver)
going to std::cout when that is not the primary output location,
e.g. when using IDLE or the IPython QtConsole.
2013-12-06 23:15:14 +00:00
Ray Speth
58a4183e55 [Matlab] Remove broken ck2ctml function
There are three problems with this function. It does not work, since
it calls ctmethods with the wrong number of arguments. Even if that
were fixed, it wouldn't do what it claims, as the method it calls
generates a CTI file, not an XML file. Finally, it is redundant, as
the 'ck2cti' function can be used for generating the CTI file, and the
CTI to XML conversion is handled automatically when importing the
phase.

Therefore, this function is being removed.
2013-12-06 23:15:08 +00:00
Ray Speth
a8111887bf [CTI] Add optional 'note' field to Phase definitions
The note field is preserved when converting to XML, and can be used to
store extra information used by applications other than Cantera.
2013-12-05 20:54:08 +00:00
Ray Speth
c7d69ac863 [Cython] Expose global 'appdelete' method
Occasionally useful for debugging memory leaks
2013-12-05 20:54:06 +00:00
Ray Speth
cd572403df Fix issues with pure fluids near temperature limits
Fixes Issue 186.
2013-11-12 23:44:51 +00:00
Ray Speth
a7bd7c6a7a [Cython] Add 'atomic_weight' method and 'atomic_weights' property
Resolves Issue 185.
2013-11-12 23:44:46 +00:00
Ray Speth
904e3e66e9 [ck2cti] Accept reaction units declared in either order
That is, energy followed by quantity or quantity followed by energy.
2013-10-21 22:13:00 +00:00
Ray Speth
94f1b35b79 [ck2cti] Partial support for scientific notation in stoichiometric coefficients
This won't work for positive exponents, because the '+' will still be
interpreted as a delimiter between terms of the reaction expression.
2013-10-21 01:55:18 +00:00
Ray Speth
6d5b7999de [SCons] Use specified 'python_compiler' to link Python module
Fixes Issue 179.
2013-10-15 17:06:35 +00:00
Ray Speth
f871dd8cf0 [SCons] Add 'python_compiler' option for Cython module compilation 2013-10-15 14:59:31 +00:00
Ray Speth
2de0ae6350 [SCons/Cython] Fix library_dirs to include BLAS/LAPACK directory 2013-09-30 01:54:12 +00:00
Ray Speth
8498123689 [ck2cti] Show line number for some parsing errors 2013-09-30 01:54:00 +00:00
Ray Speth
a6f4c111e7 [Cython] Add declarations for free functions to _cantera.pxd 2013-09-30 01:53:40 +00:00
Ray Speth
0458eb736f [Cython] Add __init__.pxd to allow 'from cantera cimport ...' 2013-09-28 18:18:23 +00:00
Ray Speth
a6ce399374 [Cython] Move extra Cython-related headers to main include directory 2013-09-28 18:18:12 +00:00
Ray Speth
332569114e [Cython] Install headers needed for derived Cython modules 2013-09-25 23:05:21 +00:00
Ray Speth
7520170f30 [Cython] Improve support for building derived Cython modules
The .pxd file now contains declarations for all of the cdef classes,
and is installed with the module.
2013-09-25 22:57:36 +00:00