headmyshoulder / odeint-v2

odeint - solving ordinary differential equations in c++ v2
http://headmyshoulder.github.com/odeint-v2/
Other
337 stars 102 forks source link

Standalone Adams-Moulton stepper #165

Closed ghost closed 9 years ago

ghost commented 9 years ago

This is more of a question since I cannot find out how to use the adams-moulton stepper on its own.

It seems not to be possible to use it with one of the integrate functions and I do not get the do_step approach right.

Could you provide a small example how to use the adams moulton stepper?

(adams-bashforth and adams-bashforth-moulton work just fine)

mariomulansky commented 9 years ago

Afaik the Adams-Moulton stepper is not intended for direct use. It's purpose is to compute the corrector step for the adams-bashforth-moulton stepper. I don't think it even can be used independently, so we can't provide an example.

What is the reason you want to use exactly this stepper, instead of adams-bashforth-moulton?

ghost commented 9 years ago

Thank you for the really fast answer! It is listed in the boost docs as a separate stepper thus I tried to use it on its own.

I am comparing different approaches in a bigger solver whose runtime might behave completely different (compared to those of pure numerics) with different approaches. But adams-moulton is not a must-have so I will just skip it.

Thanks again!

mariomulansky commented 9 years ago

I see. Maybe we should remove it from the steppers table as its appearance there seems to indicate that it can be used in the same way as the other multistep routines, which it cannot.

headmyshoulder commented 9 years ago

In principle, Adams Moulton can be used on its own. But it is does not implement the stepper concepts and can therefore not be used within integrate_* .

If you want to use it, you need to provide a prediction of the solution. Adams Moulton will then perform the correction step.

On 21.05.2015 12:14, iord wrote:

Thank you for the really fast answer! It is listed in the boost docs as a separate stepper thus I tried to use it on its own.

I am comparing different approaches in a bigger solver whose runtime might behave completely different (compared to those of pure numerics) with different approaches. But adams-moulton is not a must-have so I will just skip it.

Thanks again!

— Reply to this email directly or view it on GitHub https://github.com/headmyshoulder/odeint-v2/issues/165#issuecomment-104212950.