Refactor StoichManager for sparse Jacobian Calculations#1081
Refactor StoichManager for sparse Jacobian Calculations#1081ischoegl wants to merge 37 commits intoCantera:mainfrom
Conversation
Codecov Report
@@ Coverage Diff @@
## main #1081 +/- ##
==========================================
+ Coverage 73.45% 73.48% +0.03%
==========================================
Files 364 362 -2
Lines 47611 48009 +398
==========================================
+ Hits 34972 35280 +308
- Misses 12639 12729 +90
Continue to review full report at Codecov.
|
|
I think to fix the failures on the Conda builds, you need to include |
👍 - Ah - I was wondering about that. Thanks! I ended up moving the include of |
ae147d6 to
318e5b3
Compare
👍 Nonetheless, I still think it's a good idea to make sure that |
9dc30cb to
6f79569
Compare
Fair enough. I changed |
da06abc to
8b5a95d
Compare
This comment has been minimized.
This comment has been minimized.
7d0aac7 to
9e0a6b9
Compare
While the method is part of the initialization, it is the final step required after all reactions are added to the Kinetics object.
While changes worked and can potentially create easier-to-follow code there is a performance penalty, as additional copy operations are needed.
Create flag to specify whether third body derivatives are included
Uses wrapper.h to simplify passing of data
* Move functions to header file * Make function names more consistent * Pass raw pointers to add flexibility
Enable 'exact' temperature derivatives for forward and net rates of progress, with the caveat that the derivative of the equilibrium constant is evaluated numerically.
Make naming more consistent and improve code performance and readability.
All derivatives are taken with respect to temperature and species mole fractions. In order to clarify (and shorten method names), Jacobian routines are renamed as follows: * Kinetics::*RopTemperatureDerivatives -> Kinetics::*RatesOfProgress_ddT * Kinetics::*RopSpeciesDerivatives -> Kinetics::*RatesOfProgress_ddC * Kinetics::*RateTemperatureDerivatives -> Kinetics::*Rates_ddT * Kinetics::*RateSpeciesDerivatives -> Kinetics::*Rates_ddC Essential jacobians methods are consolidated within GasKinetics
e1c9286 to
53b764e
Compare
|
As this PR experienced substantial 'feature drift', I am closing this, and continuing with #1089 (which also avoids a meandering commit history). |
Changes proposed in this pull request
StoichManager<Eigen/Sparse>to handle sparse multiplicationsIf applicable, fill in the issue number this pull request is fixing
See #Cantera/enhancements#111 and #Cantera/enhancements#100
If applicable, provide an example illustrating new features this pull request is introducing
While calculations are handled by
<Eigen/Sparse>internally, results are exposed to the Python API as:All derivatives are checked against numerical implementations in unit tests.
At the moment, third-body terms are not considered.(Edit: now done.) There may be some overlap with #1010, where Jacobians are evaluated for entireReactorNets (whereas this PR focuses onGasKinetics).Checklist
scons build&scons test) and unit tests address code coverage