Returning solution at requested times with IDAKLU solver

Hi,

Up until now I have been using the Casadi solver. I provided t_eval as an array of time values to the solve method, and Casadi returned the solution at those time values.
When I do this with IDAKLU, it doesn’t behave in the same way, but rather returns the solution at a different array of time values, as decided by the solver.
Would someone be able to recommend the cleanest way to have the solve method return the solution at the time values in my t_eval array? I suppose I could use an interpolant but I thought there would probably be a more direct way of tackling this.

Thanks,

Isaac

This page has all the info for the updated timestepping behavior of the new IDAKLUSolver: Interpolation and evaluation points — PyBaMM v25.6.0 Manual

1 Like