cadet / CADET-Core

A modular, fast, and accurate simulation framework for (bio)chemical processes
Other
66 stars 26 forks source link

Add maximum number of AD directions check to AD Jacobian tests #287

Closed jbreue16 closed 1 month ago

jbreue16 commented 1 month ago

Ive wasted some time on debugging a Jacobian which turned out to be correct, but the number of allowed AD directions was exceeded. This somehow did not result in an exception for going out of bounds but wrote nonsense values at different positions into the Jacobian. The number of allowed AD directions is already checked for actual Simulations but not in the AD Jacobian test. This PR adds such a check to that test function.