Jacobian information for external function #4372
|
Hi, Just one minor question: What is the meaning of This gets especially interesting when providing Hessian matrix information, i.e., via For completeness, I have my external function definition attached: system.c Thanks and regards, |
Replies: 1 comment 1 reply
|
For an original function
CasADi documents that convention directly in So the display means "a 2-by-1 slot with zero structural nonzeros because this Jacobian routine does not need the already-computed value of For the attached function, the mapping is: The four entries you write for becomes The same convention recurses for casadi_int jac_jac_f(...) { return 0; }reports success without populating any result buffers. I would remove that exported symbol until it is fully implemented, or implement its complete input/output metadata, sparsities, and values. Otherwise CasADi may discover it as an available derivative callback and consume uninitialized/incorrect second derivatives. The external-function naming convention is described in the CasADi custom-function guide. |
out_Dxis part of CasADi's canonical full-Jacobian function signature; it is not another derivative or a seed.For an original function
Function::jacobian()constructs a function shaped likeCasADi documents that convention directly in
Function::jacobian(): the original outputs are appended to the derivative function's inputs, and inputs that the derivative routine does not need are represented as all-zero sparse matrices with the correct dimensions.So the display
means "a 2-by-1 slot with zero structural nonzeros because this Jacobian routine does not need the already-computed value of
Dx." It does not me…