Deriving the Jacobians without MTK

I have a nonlinear, numeric model. The model uses a non-linear solver internally. It has three inputs, one output and many parameters.

How can I calculate the Jacobians of a linearized model? Can I use AutoFiniteDiff() for it? Can I do that without using MTK?

2 Likes

I did exactly that in VortexStepMethod.jl/src/solver.jl at 81a402d16204ac9fab65383cdb101b576d96e189 · Albatross-Kite-Transport/VortexStepMethod.jl · GitHub

Edit: you just have to be careful with the step sizes and tolerances. What works well for me:

backend = AutoFiniteDiff(absstep=1e2*nonlinear_solver.atol, relstep=1e2*nonlinear_solver.rtol)