资 源 简 介
News
Note: An error was discovered in the root handling. This is fixed
in the latest version.
The wrapper is based on code posten on the cython-dev mailing list by
Mr. Jon Olav Vik.
Highlights
CVODE - Solver for stiff and nonstiff ordinary differential equation
IDA - Solver for the solution of differential-algebraic equation (DAE) systems
KINSOL - solver for nonlinear algebraic systems based on Newton-Krylov solver technology
The CVODE and IDA solvers support root finding and the solver throws an exception
on finding a root.
There is also an example of implementing the explicit equation in Cython for speed.
Bouncing ball example from OpenModelica manual
```
import array
import numpy as np
from sundials import *
class Ball:
TINY = 1e-16
def init(self, e = 0.7, g = 9.81):
self.e = e
self.g = g
def f(self, t, y, sw):
if sw