inetgrate_n_steps does not affect the internal state of a stepper
vhartman opened this issue · 1 comments
vhartman commented
Hey
In the controlled Adams-Bashforth-Moulton stepper I am implementing, I am working with an internal state which keeps track of the previous steps and derivatives. Since this is a controlled stepper, using integrate_n_steps
results in a call to integrate_adaptive
. However, since the stepper is passed by value, the internal state of the stepper in integrate_n_steps
does not change. I think a similar problem occurs in the rosenbrock4
stepper, and every step is treated like a first step.
I am not sure if this is intended.
Best regards,
Valentin
mariomulansky commented
You can pass explicit references to the stepper (ie std::ref(stepper)). For steppers with internal state this is required.