Set extra parameters for right-hand-side function
Hi All, I wondered whether we set parameters for rhs function in scikits.odes.ode, something similar to sicpy: scipy.integrate.ode.set_f_params. I have tried to set parameters as global ones which works indeed. However, I still want to know whether I can set parameters more explicitly because that will probably make easier in some cases e.g when multiple cores are used for different sets of parameter values. Thanks. Regards, Huan
This is currently solver dependent, you'll need to look at the individual solver documentation for working out how to do this.
This is python. Use an object and a member function for the rhs, so self.f_rhs Then in self.f_rhs, call your real right hand function, with extra parameters: self.extra_par_1, ....
Thanks. For cvode, https://github.com/bmcage/odes/blob/975f20b5ef07ed013900ec0182a9e18d7a66ef90/scikits/odes/sundials/cvode.pyx indeed defines in set_options(self, **options).