[SciPy-Dev] 1D parabolic PDE solver

Ralf Gommers ralf.gommers at gmail.com
Fri Sep 7 02:11:31 EDT 2018


On Mon, Aug 13, 2018 at 2:28 PM Saixoz <xsaixosx at gmail.com> wrote:

> Dear all,
>
>
>
> A recent task that I had to perform involved rewriting a large number of
> scripts and files from MATLAB to Python. In the process I noticed that
> Scipy lacks a PDE solver. When I tried to find alternatives, the options
> found were all unusable for various reasons.
>
>
>
> I wrote a solver which solves slab symmetric problems with a similar PDE
> form to that which MATLAB’s pdepe solves, namely c(x,u,t,du/dx)(du/dt) =
> (d/dx)(f(x,u,t,du/dx) + s(x,u,t,du/dx) using the method of lines approach,
> finite differences, and the BDF method provided by solve_ivp.
>
>
>
> I was wondering whether there would be some interest in adding the solver
> under scipy.integrate, to begin building a part of a collection. I feel
> that for very simple problems such as the ones that my solver can solve,
> users shouldn’t need to turn to overly complex packages.
>

Hi Nicolas, thanks for the thoughtful email. Sorry about the lack of
responses - this reflects not that there's no interest, but that we're
short on maintainer power for SciPy. Given this, and especially that we
don't have a dedicated maintainer for scipy.integrate, I would suggest to
develop your PDE solver as an independent package. If it becomes
popular/mature, we may consider integration into SciPy again.

Cheers,
Ralf



>
> If there is interest, I would need to clean up the code and add tests and
> stability checks to it, help/advice would be appreciated. I believe BDF
> already has stability in the time grid, so I would only need to check
> stability in space grid? Can someone confirm? I’d also like to move a large
> chunk of the code to Cython since I wrote it in native Python and used
> Numba to speed it up, which still makes it rather slow. I’ve worked in C
> and Python before but never in Cython, could someone provide me with a link
> to get started?
>
>
>
> As far as legal issues go, there should be no concern – I explicitly
> avoided looking at and using the MATLAB source code as a reference since I
> wanted to leave publishing the solver under Scipy an option. I did use
> their solver to check some of the solutions that my solver produced though.
> The solver was written while working for the ETH Zurich, where my
> supervisor responded very enthusiastically to the possibility of providing
> the solver to the public under Scipy, so there should be no issues there
> either.
>
>
>
> All the best,
>
> Nicolas
> _______________________________________________
> SciPy-Dev mailing list
> SciPy-Dev at python.org
> https://mail.python.org/mailman/listinfo/scipy-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/scipy-dev/attachments/20180906/a7833ff7/attachment.html>


More information about the SciPy-Dev mailing list