Numerical Recipes-based ODESolve¶
These classes are an adaptation of the very nice Numerical Recipes ODE solvers into Python. The solver is divided into two parts: specific step iterators (eg Dopri853) and the framework for stepping through the ODE (steppers)
Steppers and helpers¶
-
class
pynlo.util.ode_solve.steppers.
Output
(nsaves=None)[source]¶ The output class is used by the ode solver to store the integrated output at specified x values. In addition to housing the matrices containing the x and y data, the class also provides a simple function call to store new data and resizes the output grids dynamically.
Parameters: nsaves – Number of anticipated save points, used for calculating value of x at which integrand will be evaluted and saved. -
init
(neqn, xlo, xhi, dtype=<type 'numpy.float64'>)[source]¶ Setup routine, which creates the output arrays. If nsaves was provided at class initialization, the positions at which the integrand will be saved are also calculated.
Parameters: - neqn – Number of equations, or the number of y values at each x.
- xlo – Lower bound of integration (start point.)
- xhi – Upper bound of integration (stop point.)
- dtype – Data type of each y. Any Python data type is acceptable.
-