Status Quo:
At the moment users need to copy the value of x_out and y_out if they want to use them independently from the type implementing System.
My situation
I have a reactor bed cascade and use solout to stop if a reaction rate reaches zero (by this concluding the length of the reactor bed). In a for loop the next reactor bed get initialized with the previous results and the results are stored in a concluding data structure. I cannot move as I can only access references to x_out and y_out.
Solution:
Implement From<Dop853/ Dopri5 / RK4> for (Vec<f64>, Vec<V>)
Status Quo: At the moment users need to copy the value of
x_out
andy_out
if they want to use them independently from the type implementingSystem
.My situation I have a reactor bed cascade and use solout to stop if a reaction rate reaches zero (by this concluding the length of the reactor bed). In a for loop the next reactor bed get initialized with the previous results and the results are stored in a concluding data structure. I cannot move as I can only access references to
x_out
andy_out
.Solution: Implement From<Dop853/ Dopri5 / RK4> for
(Vec<f64>, Vec<V>)
See: from trait See: into trait
We may instead introduce a solver result type as wrapper:
and implement
from
for that data structure. By this we make more use of the Rust type system.Benefit: Users can spare a copy of a heap object that may be expensive when using into or from.
Proposal If we agree on the solution, I could implement that in my free time after xmas.