Closed taylormcd closed 2 years ago
Let me make sure I understand. There is already a function to provide that Jacobian if you have it drdy
. Are you suggesting a different format for the solve function so you return them both at the same time? Like y, A = solve(x, p)
where A = ∂r/∂y. We could of course accomplish that already on the user side by caching the value of A when solve was called, then returning it in a simple function. I could see how this might be more convenient, although for packages like NLsolve the residual and Jacobian are separate functions.
The current method for providing user-defined jacobians could be simplified by allowing users to return the jacobian matrix from the solution procedure instead. Then a new function for the jacobian wouldn't have to be defined since it is often already computed as part of the solution procedure. The relevant modifications to make this happen are in the
solve-drdy
branch.