srenevey / ode-solvers

Numerical methods to solve ordinary differential equations in Rust.
BSD 3-Clause "New" or "Revised" License
64 stars 26 forks source link

Add mutable System trait #27

Open Tiggax opened 4 months ago

Tiggax commented 4 months ago

I have created a simple mutable system implementation similar to the suggestion talked in #16. As oposed to creating a seperate trait, this one just adds a function to the System trait, an the model then uses the mut_integrate as opposed to integrate function to use it.

The System trait implements an aditional mut_system function, and currently only RK4 model has it added. If the impementation is desirable i might add the other two implementations.

Usage is shown in the examples/bioractor.rs i added.

If this change is favorable, i shall add the other integration options, and add tests.

Any suggestions/ critics are welcome :)