Commit Graph

1535 Commits

Author SHA1 Message Date
Bryan Weber
27696feab8 Rename mglob function to multi_glob 2021-05-04 21:36:21 -04:00
Bryan Weber
edf5e4cc77 Limit exported functions from buildutils
Each SConscript module imports what it needs from the stdlib.
2021-05-04 21:36:21 -04:00
Bryan Weber
f5dc022b33 Rename and refactor get_command_output 2021-05-04 21:36:21 -04:00
Ingmar Schoegl
3466422c2b [Cython] document usage of 'long' instead of 'long int' 2021-04-30 12:14:30 -04:00
Ray Speth
1ab3e6a039 [Python] Explain some logic in get_types 2021-04-30 12:14:30 -04:00
Ingmar Schoegl
9447dacc26 [Python] Add clarifications and streamline code
* Clarify empty AnyValue
* Fix docstrings
* Address review comments
2021-04-30 12:14:30 -04:00
Ray Speth
8de5bb4dc5 [Python] Test that AnyValue held types are correct
Remove tests for unhandled cases that are now handled
2021-04-30 12:14:30 -04:00
Ray Speth
ce57ed3166 Use alternative implementation of python_to_anyvalue 2021-04-30 12:14:30 -04:00
Ingmar Schoegl
924c916ba9 [Python] streamline implementation
Simplify code using:
* explicit type conversions
* leverage of set properties

Co-authored-by: Ray Speth <speth@mit.edu>
2021-04-30 12:14:30 -04:00
Ingmar Schoegl
ae7b54fed0 [Python] Improve error messages for conversions from Python to AnyValue
Also, add missing case for conversion of list of dictionaries
2021-04-30 12:14:30 -04:00
Ingmar Schoegl
e3ee42f40a [Python] Improve Python API for empty AnyValue/AnyMap objects 2021-04-30 12:14:30 -04:00
Ingmar Schoegl
af5cd4abc7 [CI] Add unit tests for Python to AnyValue/AnyMap conversion 2021-04-30 12:14:30 -04:00
Ingmar Schoegl
2035981258 [Python] Convert complex Python types to C++ AnyValue 2021-04-30 12:14:30 -04:00
Ingmar Schoegl
2810433f1c [Python] Convert simple Python types to AnyValue/AnyMap 2021-04-30 12:14:30 -04:00
Ray Speth
f72bbf637d [Test] Skip test_ignition_delay_sensitivity
This test is not reliable and causes lots of CI headaches.

Some of the problems are documented in
https://github.com/Cantera/enhancements/issues/55
2021-04-28 17:11:51 -04:00
Ray Speth
0d45b1065d [Test] Fix extinction test cases that weren't using the right temperature 2021-04-28 17:11:51 -04:00
Ray Speth
96abea8d0c [Python] Fix set_initial_guess for CounterflowTwinPremixedFlame 2021-04-28 17:11:51 -04:00
Ray Speth
9fa2793205 [Test] Fix interaction with pytest's use of tempfile 2021-04-28 17:11:51 -04:00
Ingmar Schoegl
b753dd5e41 [Kinetics] Update serialization of three-body reactions
Three-body reactions with explictly declared collision partners do not
need to declare additional fields, i.e. 'type', 'default-efficiency', and
'efficiencies'.
2021-04-26 20:21:06 -04:00
Ingmar Schoegl
05983e74ed [Kinetics] Update duplicate check for undeclared three-body reactions
Also, address review comments
2021-04-26 20:21:06 -04:00
Ingmar Schoegl
967ea587c6 [CI] unit tests for detection of implicit three-body reactions 2021-04-26 20:21:06 -04:00
Ingmar Schoegl
b01d44d691 [Kinetics] Detect three-body reactions with specified collision partners
Per discussion in #967, species-specific third-body reactions should use
molar concentrations for collision partner concentrations instead of
activity concentrations to be consistent with three-body reactions with
generic collision partners.
2021-04-26 20:21:06 -04:00
12Chao
f995e4ef0e use assertNear to test the exact ratio of rate constants
before and after change the coverage dependencies
2021-04-20 13:15:15 -06:00
Ray Speth
aab8815fe4 Bump version to 2.6.0a2 2021-04-20 13:15:15 -06:00
Ray Speth
1d548bed36 [Examples/Python] Reformat docstring for Blowers-Masel example
Create a shorter leading paragraph which will be shown in the index
of examples on the website.

Document the dependencies.

Modify plot formatting slightly and display them before the script exits.
2021-04-20 13:15:15 -06:00
12Chao
bf4edbbc5f Add 2 plots in the Blowers-Masel example 2021-04-20 13:15:15 -06:00
12Chao
c6f568d94f Add an example about use case of Blowers-Masel code 2021-04-20 13:15:15 -06:00
Ray Speth
28e29f9311 Fix some formatting/whitespace issues 2021-04-20 13:15:15 -06:00
12Chao
f6ff6a72e0 add more docstrings about the Blowers-Masel classes 2021-04-20 13:15:15 -06:00
12Chao
cb862a028b change 'BMInterfaceReaction' to 'BlowersMaselInterfaceReaction' 2021-04-20 13:15:15 -06:00
12Chao
448c281c3c reduce the test input files and modify the tests to keep them working 2021-04-20 13:15:15 -06:00
12Chao
5513452d6b [Test/Cython] The unit tests for Blowers Masel interface
reaction and reaction rates classes

The tests are added in both C++ and Python interfaces. Two
minimal yaml files are included for the tests.
2021-04-20 13:15:15 -06:00
12Chao
27fbf94387 [Kinetics/Cython] Add Blowers Masel interface reaction and
reaction rate classes in InterfaceKinetics

The changes are made in both C++ and Cython interfaces.
2021-04-20 13:15:15 -06:00
12Chao
62e99b21d0 [Test/Cython] Add unit tests for Blowers Masel reaction and rate classes
The C++ test is only for Blowers Masel rate test, and the tests
in Python interface are for both the reaction and rate classes.
Two minimal yaml files are added as the input file for the tests
2021-04-20 13:15:15 -06:00
12Chao
c5375ffe15 [Kinetics/Cython] Add Blowers Masel reaction class in GasKinetics
This commit inclues Blowers Masel rate class and Blowers
Masel reaction class, which are aimed to be used in GasKinetics.
The changes are implemented in both C++ and Python/Cython interfaces.
2021-04-20 13:15:15 -06:00
China
fe296285a5 Add thermal conductivity to DustyGas in python. (#988)
* Add thermal conductivity to DustyGas in python.

* Added thermal conductivity example in dustygas python example script

* Added thermal conductivity test to TestDustyGas class
2021-04-18 21:39:06 -06:00
Ray Speth
81cffde7d2 [Input/Test] Improve test coverage of YAML serialization 2021-04-14 09:43:09 -05:00
Ray Speth
9b2bad643f [Input/Test] Add tests of solution properties for round-tripped phases 2021-04-14 09:43:09 -05:00
Ray Speth
c88b44a889 [Input/Examples] Update Python examples to demonstrate YAML output 2021-04-14 09:43:09 -05:00
Ray Speth
65dd8e9511 [Python/Input] Make function names more Pythonic 2021-04-14 09:43:09 -05:00
Ray Speth
716e397c2e [Input] Refactor to reduce Python manipulations of AnyMap
Eliminates the 'mergeAnyMap' function, and introduces a 'parameters' method
for classes to return an AnyMap which can optionally contain the user-provided
input data, rather than needing to create the AnyMap in advance and add the
user-created fields separately.
2021-04-14 09:43:09 -05:00
Ray Speth
df262a0f92 [Input] Use full AnyMap sorting algorithm in all cases
The simpler sorting algorithm used in Python did not account for the
additional ordering rules allowed by the AnyMap class.
2021-04-14 09:43:09 -05:00
Ray Speth
8b8bf4b12b [Input] Fix key ordering when outputting to Python
Fixes an error in the AnyValue assignment operator introduced in dab4b7066.
2021-04-14 09:43:09 -05:00
Ray Speth
e6f5195b5d [Input/Python] Enable generation of YAML files from Python Solutions 2021-04-14 09:43:09 -05:00
Ray Speth
f6bd2c0954 [Input] Add option of setting units to YamlWriter 2021-04-14 09:43:09 -05:00
Ray Speth
73f779fb12 [Input] Enable conversion of added data to units of the parent AnyMap 2021-04-14 09:43:09 -05:00
Ray Speth
0f0a02056f [Python] Add access to input data for Reaction objects 2021-04-14 09:43:09 -05:00
Ray Speth
b8c04c27dd [Python] Add access to input data for Species objects 2021-04-14 09:43:09 -05:00
Ray Speth
b01c8b4e3f [Python] Add access to input data for Solution objects 2021-04-14 09:43:09 -05:00
Ray Speth
17497d0528 [Python] Add conversion of AnyMap to native Python types 2021-04-14 09:43:09 -05:00