Closed yut23 closed 2 months ago
do you expect the diffs shown in the test suite?
No, I don't think the diffs should be that large. I'm even more confused by the diffs with the numerical Jacobian, as that shouldn't be using autodiff at all.
let me rerun the test
I found a few optimizations I made that were causing the differences with the numerical Jacobian, and I'm now pretty sure the other big diffs are just compounded from the roundoff diffs in the analytical Jacobian.
most test_rhs diffs are now roundoff, except for powerlaw, which is Inf http://groot.astro.sunysb.edu/Microphysics/test-suite/gfortran/2024-07-23-001/index.html
This should be ready to merge. The Inf diffs for powerlaw are because we weren't calculating the temperature derivatives at all before.
Timings for
test_aprox_rates
, with a loop added around therate_*
calls.RHS::rhs()
calls the version without derivatives, while the analytic Jacobian calls the version with derivatives. The previous code always calculated the derivatives, hence the same timings on the left.