Hi,
I’m not sure I understand exactly what you’re trying to do. The sim.advance method does not provide direct control over the internal steps taken by CVodes. All it does is interpolate the solution based on the most recent time steps to the specified point in time. However, it is unlikely that the integrator is actually taking the exact same steps in the second case, and so there will be some small differences in the solution, which should be at the scale of the specified relative and absolute integrator tolerances. One reason for this is that SUNDIALS uses a slightly different process for picking the initial step size when you use step() (where it has no idea of the time scales that are relevant to the problem) versus when you use advance(t1) (where the time you specify gives it at least some idea of a relevant scale).
If you’re seeing larger discrepancies than this, please provide a minimal working example so we can understand what’s going on.
Regards,
Ray