Closed JamesPino closed 9 years ago
Should we close this, or were we still going to look into a cleaner solution. I think Jeremy had an idea about using an inline lambda function which would clean up the two extra wrap functions.
Rewritten using lambda functions in ee20151. Closing the issue.
Currently we use scipy. integrate.ode , which is a generic wrapper allowing multiple solvers (vode, zvode, lsoda, dopri5, dop853). It solves the ODEs using while self.integrator.successful() and self.integrator.t < self.tspan[-1]: self.y[i] = self.integrator.integrate(self.tspan[i]) # integration i += 1 There is some overhead in this that can be prevented between calling the fortran code and python. For lsoda, scipy has an lsoda specific solver. (http://docs.scipy.org/doc/scipy-0.15.1/reference/generated/scipy.integrate.odeint.html ). Using this method saves between 10~20%. I wrote a class to use this. However, if we choose another solver then we cannot use it. Basically I just need to merge them together and check. If integrator == 'lsoda': use this type.
We may want to just use the new simulator class?