Closed burrbull closed 5 years ago
Could you please explain why 08dcae55903677a865d1ce00908e0fd0377499fc is required ?
Abstract example:
struct Solver {
k: f64;
}
impl System<State> for Solver {
// Equations of motion of the system
fn system(&self, _t: Time, y: &State, dy: &mut State) {
dy[0] = ...
}
fn solout(&mut self, t: Time, _y: &State, _dy: &State) -> bool {
self.k = foo(t, self.k);
false
}
}
fn main {
for k in 1..10 {
let solver = Solver {k: k as f64};
let mut stepper = Dopri5::new(solver, ...);
let res = stepper.integrate();
...
}
}
I have additional propose for improving your solvers. But this is breaking change and some more user code.
With this change you can use non-const external values in equations.