[SciPy-dev] sparse solvers in scipy rock

Fernando Perez fperez.net at gmail.com
Tue Jan 15 13:16:10 EST 2008


On Jan 15, 2008 6:20 AM, Ondrej Certik <ondrej at certik.cz> wrote:
> Hi,
>
> yesterday I wrote some solver for 1D time dependent schrodinger
> equation to my school,
> using explicit and implicit methods and using scipy sparse solvers,
> because I was lazy to use
> some fortran routines for inverting the tridiagonal matrix, and I was
> surprised how nice it works in scipy.
> You did a great job. I am convinced that is the way to call all sparse solvers.
>
> Here is the code:
>
> http://hg.certik.cz/schrod1D/
>
> I based it on the example:
>
> http://www.scipy.org/Cookbook/SchrodingerFDTD
>
> which uses central differences explicit method, but I wrote it my way,
> using complex numbers directly and Cython to speed it up.
>
> I also implemented euler differences explicit method,
> which totally blows up after a few iterations, and also an implicit
> method, which works really well.
>
> Where do you think I could put it together with some documentation how
> to play with it? to the above wiki, or should I create a new wiki for
> that?
> It's an example how to use Cython+Numpy+scipy sparse solvers (superlu
> currently).

I'd suggest making another Cookbook entry for it, and linking both
Schrodinger ones to each other, so that an interested party can read
both the simpler, pure python FDTD approach and your more
sophisticated one as well.

The better the cookbook gets, the easier it will be for newcomers to
find examples that are similart to their needs, from which they can
learn and get started.

Thanks!

Cheers,

f



More information about the SciPy-Dev mailing list