Ray Speth
f335350c35
Always use std::shared_ptr
...
Since we compile as c++11, std::shared_ptr is guaranteed to exist.
2015-10-14 18:45:23 -04:00
Ray Speth
1f1f14b523
Fix MinGW compilation error in C++11 mode
2015-10-14 18:45:22 -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
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
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
67172cd478
[Test] Disable problematic test with old CVODE
2015-09-08 12:26: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
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
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
Bryan W. Weber
ca3a09a3d4
Add setuptools directories to python_minimal .gitignore
2015-08-02 23:06:16 -04:00
Bryan W. Weber
1174de9232
Reformat Cython setup.py.in and add metadata
...
Conform to 4 space tabs. Add classifiers about Cantera. Add long
description.
2015-08-02 23:06:16 -04:00
Bryan W. Weber
b979cea3d2
Switch Cython and python interfaces to setuptools
...
Replace distutils with setuptools in the Cython and python_minimal
interfaces. Add console_scripts option to generate OS specific scripts to run
ck2cti, mixmaster, and ctml_writer
Remove script files that are obsoleted by console_scripts from
setuptools. Remove installation of the script modules from SConstruct.
Fix Python installers so that when a prefix directory is specified on the
command line, setuptools doesn't throw an error. The setuptools documentation at
[1] prefers setting PYTHONUSERBASE rather than PYTHONPATH. Use normpath to avoid
bugs in setuptools on Windows [2]. Specify an empty "--prefix" if the compiler
is clang to fix a bug with Homebrew Python on Mac OSX [3].
[1]: https://pythonhosted.org/setuptools/easy_install.html#custom-installation-locations
[2]: http://stackoverflow.com/q/31629398
[3]: https://github.com/Homebrew/homebrew-python/issues/187
2015-08-02 23:06:16 -04:00
Bryan W. Weber
5f8bd40c0d
Add functions to main scripts to be entry_points
...
Add functions to ck2cti, ctml_writer, and a new file __main__.py to
mixmaster to be the entry_points locations that setuptools scripts
will call.
2015-08-02 23:06:16 -04:00
Bryan W. Weber
c6ccffe44f
Move imports in ck2cti to the top of the file
2015-08-02 23:06:16 -04:00
Bryan W. Weber
eb2df78260
Fix syntax error in a Python example
2015-08-02 23:06:16 -04:00
Bryan W. Weber
0b5a46fe03
Remove execute bit from files that don't need it
2015-08-02 23:06:16 -04:00
Ray Speth
f90bf978df
Use += and -= where appropriate
2015-08-02 23:06:15 -04:00
Ray Speth
e4c45b6429
General whitespace cleanup
...
Remove unnecessary blank lines and trailing whitespace. Replace tabs with
spaces.
2015-08-02 23:06:15 -04:00
Ray Speth
e8292d387e
Fix definition of elemental mole fraction
...
The elemental mole fractions should be invariant under composition changes which
conserve atoms.
2015-07-16 10:41:39 -04:00
Ray Speth
f1f10b6526
Remove unused, deprecated code marked for removal after Cantera 2.2
2015-07-15 12:08:50 -04:00
Ray Speth
546289f737
Remove deprecated code with functional alternatives
2015-07-13 18:59:09 -04:00
Ray Speth
7d36e1eb13
[Python/1D] Fix FlameBase.write_csv
...
Also add a test for this method
2015-07-08 23:57:22 -04:00
Thomas Fiala
b7f2451f06
[Doc] Improve documentation for reactor networks and add more examples
...
Resolves #281
2015-07-07 19:48:15 -04:00
Ray Speth
ce21b08d41
[Python] Document ThermoPhase DP, DPX, and DPY properties
2015-07-03 00:14:35 -04:00
Ray Speth
07f25621f3
[SCons] Fix include order when compiling Cython module
2015-07-01 12:24:49 -04:00
Ray Speth
94316d8416
[Python/Examples] Demonstrate a non-trivial velocity function
...
This shows how the velocity function can be used to implement a wall where the
expansion rate coefficient is a function of time.
Also extend the integration interval for this example to actually demonstrate
ignition of both mixtures.
2015-06-24 15:20:00 -04:00
Ray Speth
140da430c0
Check for non-existent species in setMass/MoleFractionsByName
2015-06-24 13:05:28 -04:00
Ray Speth
4efad93a6d
[Kinetics] Fix handling of integral, explicit reaction orders
...
If any of the reaction orders differ from the corresponding stoichiometric
coefficients, the reaction needs to be handled as the general case, instead of
just when the orders are non-integral.
2015-06-22 11:56:56 -04:00
Ray Speth
1d7104a96b
Fix race condition when Python 2 and Python 3 tests run in parallel
2015-06-19 14:23:45 -04:00
Ray Speth
f6f868fe28
[Reactor] Check for Reactor contents before installing FlowDevice
...
Fixes #279 .
2015-06-18 14:37:54 -04:00
Ray Speth
c0fa589b8c
[Reactor] Fix segfaults in updateMassFlowRate due to unset parameters
...
The downstream and upstream Reactors, the "master" flow controller, and the
coefficient arrays were being read without checking that they had been
initialized.
Fixes #278 .
2015-06-18 12:18:59 -04:00
Kyle Niemeyer
cd545af5ed
[Python/Thermo] Added functions for getting species thermo parameters
...
Resolves #275 ; Closes #276 ; Closes #277
2015-06-17 22:57:51 -04:00
Bryan W. Weber
60827267b7
Add MATLAB interface to the setState_RP function
2015-06-15 17:47:37 -04:00
Bryan W. Weber
0b92ef20e5
Add the missing getters to the Python tests
2015-06-15 17:47:37 -04:00
Bryan W. Weber
20455056f8
Add Python interface for setState_RP + tests
2015-06-15 17:47:37 -04:00
Ray Speth
2f7e05040c
[ck2cti] Improve handling of single T-range thermo data
2015-06-15 16:47:54 -04:00
Ray Speth
b25167e4b9
[ck2cti] Print the current thermo entry when an error is encountered
2015-06-15 16:26:41 -04:00
Ray Speth
8d4e9bff6e
[Reactor] Make argument to ReactorNet.step optional and deprecated
...
The value of this argument has almost no effect on the integrator, and
frequently confuses users since the ReactorNet can end up at a time either
greater or less than the specified time. By removing this argument, the
distinction betwen step() and advance(t) becomes much more clear.
2015-06-11 14:03:20 -04:00
Ray Speth
392b0f5692
[Reactor] Do not use argument to step/advance to set the max time step
...
Allow CVODES to take arbitrarily large timesteps by default. If a maximum time
step is desired, it can be set explicitly.
2015-06-11 14:03:20 -04:00
Ray Speth
835b81a6f8
[MixMaster] Display more useful error messages
...
Include the full text of the original exception, and print this to the terminal
as well.
2015-06-02 11:05:35 -04:00
Ray Speth
a677409283
[MixMaster] Fix displaying of errors when using Python 2
2015-06-02 11:05:35 -04:00