You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In order to calculate sensitivities, the pybamm casadi solver solves the full sensitivity equations due to the fact that casadi does not currently calculate sensitivities natively. This is inefficient compared with the staggard approach taken by libraries like Sundials (which we use in the IDAKLU solver), and will soon be unneccesary once Casadi completes current work on adding sensitivity calculations (casadi/casadi#3682). More importantly, the need to support explicit sensitivity calculations complicates a lot of BaseSolver, ProcessedVariable and Solution code, and forces extra complexity/inefficiency on the other solvers. Eg. the IDAKLU solver currently reshapes and post-processes its sensitivity calculations to fit in with the casadi solver's sensitivity output.
This issue proposes to remove the explicit sensitivity calculation support in PyBaMM, leaving the casadi solver unable to calculate sensitivities, at least until Casadi completes casadi/casadi#3682. The goal is to simplify on-going work on the solvers in #3910. If the user attempts to calculate sensivities with the casadi solver an error will be raised recommending the use of the IDAKLU solver instead.
The text was updated successfully, but these errors were encountered:
this was discussed at the developer meeting 28/10/2024 and everyone present was happy with removing the explicit sensitivity calculation for the casadi solver
Hi @martinjrobins, do you have a target release for this issue to land in? It would be great if this was packaged alongside a release with the IDAKLU becoming the default solver, as I think we want the default solver to support sensitivities, right? A user error is helpful, but having the default solver supporting sensitivities seems like something we would want to maintain.
In order to calculate sensitivities, the pybamm casadi solver solves the full sensitivity equations due to the fact that casadi does not currently calculate sensitivities natively. This is inefficient compared with the staggard approach taken by libraries like Sundials (which we use in the IDAKLU solver), and will soon be unneccesary once Casadi completes current work on adding sensitivity calculations (casadi/casadi#3682). More importantly, the need to support explicit sensitivity calculations complicates a lot of BaseSolver, ProcessedVariable and Solution code, and forces extra complexity/inefficiency on the other solvers. Eg. the IDAKLU solver currently reshapes and post-processes its sensitivity calculations to fit in with the casadi solver's sensitivity output.
This issue proposes to remove the explicit sensitivity calculation support in PyBaMM, leaving the casadi solver unable to calculate sensitivities, at least until Casadi completes casadi/casadi#3682. The goal is to simplify on-going work on the solvers in #3910. If the user attempts to calculate sensivities with the casadi solver an error will be raised recommending the use of the IDAKLU solver instead.
The text was updated successfully, but these errors were encountered: