1

I create a boost::odeint stepper as follows:

auto stepper=boost::numeric::odeint::make_dense_output(0.01/*Absolute*/,0.1/*Relative*/, boost::numeric::odeint::runge_kutta_dopri5< CombinedState >() );

There will be times during the integration of my system where it "lies low" for a while. During this periods it seems as though the integrator sometimes increases its step size to the point where it then jumps over areas of interest.

Is there a way to limit the integrator's step size so it never exceeds a given maximum?

4

1 回答 1

2

很抱歉,但目前这是不可能的。不过,如果此功能对您来说真的很重要,只需将受控龙格库塔复制到具有不同名称的步进器,例如 max_dt_controlled_runge_kutta 并手动插入最大时间步长的检查。代码不是太复杂。您只需要做两次,因为受控的runge_kutta 存在两个特化。

如果有问题,请告诉我。

于 2013-05-22T06:13:40.967 回答