… issue (#30) with certain mechanisms. See Issue #30 for further information.
So in array_creator.py I take the dtype from the rate_info instead of defining it as kint_type.
In create_jacobian.py I modified the allint variable related parts to be compatible with it's definition.
The fix has been tested to work with C and OpenCL languages.
However, it is worth noting that this fix has not been tested truly thoroughly. I have compared the reaction rate vectors with cantera in some reference conditions with perfect agreement. However, Jacobian matrices are not tested in detail. I presume testing against finite diff jacobian will be easy for you with your up and running test-bench.
A second note is that I have noticed a bit weird behavior when using this polimi mechanism (http://creckmodeling.chem.polimi.it/menu-kinetics/menu-kinetics-detailed-mechanisms/menu-kinetics-complete-mechanism) with this fix and with OpenCL language. Sometimes, almost randomly, the pyjac generates species_rate.ocl where the main "species_rates" - kernel lacks the definition for some of the variables it requires (e.g. b, kf, Pr etc.). However, running pyjac a few times again or installing it again typically removes the problem.
I don't know whether the above issue is related to this fix or something deeper within the implementation...
… issue (#30) with certain mechanisms. See Issue #30 for further information.
So in array_creator.py I take the dtype from the rate_info instead of defining it as kint_type.
In create_jacobian.py I modified the allint variable related parts to be compatible with it's definition.
The fix has been tested to work with C and OpenCL languages.
However, it is worth noting that this fix has not been tested truly thoroughly. I have compared the reaction rate vectors with cantera in some reference conditions with perfect agreement. However, Jacobian matrices are not tested in detail. I presume testing against finite diff jacobian will be easy for you with your up and running test-bench.
A second note is that I have noticed a bit weird behavior when using this polimi mechanism (http://creckmodeling.chem.polimi.it/menu-kinetics/menu-kinetics-detailed-mechanisms/menu-kinetics-complete-mechanism) with this fix and with OpenCL language. Sometimes, almost randomly, the pyjac generates species_rate.ocl where the main "species_rates" - kernel lacks the definition for some of the variables it requires (e.g. b, kf, Pr etc.). However, running pyjac a few times again or installing it again typically removes the problem.
I don't know whether the above issue is related to this fix or something deeper within the implementation...
-HK