headmyshoulder / odeint-v2

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

Custom break conditions #123

Closed konstantinmiller closed 8 years ago

konstantinmiller commented 10 years ago

Hi!

I would like to interrupt integration if system state satisfies certain conditions (proximity to a certain set of points).

I found your comment on StackOverflow stating that you were going to implement integrate routines accepting custom break conditions. The comment is from 2013 and it is saying that such routines should appear in few weeks.

I just browsed through odeint documentation but could not find this feature. Could you please give me a hint?

Thanks!

Best Konstantin Miller

headmyshoulder commented 10 years ago

Hi,

we stopped the development of integration routines with break conditions. It seems, that they are not the right abstraction for this task.

BUT, we have iterators which iterate the ode and which can be easily used to break the integration. See the examples in

https://github.com/headmyshoulder/odeint-v2/blob/master/libs/numeric/odeint/examples/adaptive_iterator.cpp

especially line 350.

mariomulansky commented 8 years ago

Essentially duplicate of #9