Skip to main content

A Finite-Difference PDE solver.

Project description

PDEPy

https://travis-ci.org/olivertso/pdepy.svg?branch=master https://coveralls.io/repos/github/olivertso/pdepy/badge.svg?branch=master

A python 3 library for solving initial and boundary value problems of some linear partial differential equations using finite-difference methods.

  • Laplace

    • implicit central

  • Parabolic

    • explicit central

    • explicit upwind

    • implicit central

    • implicit upwind

  • Wave

    • explicit

    • implicit

Examples

>>> import numpy as np
>>> from pdepy import wave
>>> x = np.linspace(0, 1., 5)
>>> y = np.linspace(0, 1., 5)
>>> d_init = 1.
>>> init = x * (1-x)
>>> bound = y * (1-y)
>>> wave.solve((x, y), (d_init, init, bound, bound), method='e')
array([[ 0.    ,  0.1875,  0.25  ,  0.1875,  0.    ],
       [ 0.1875,  0.375 ,  0.4375,  0.375 ,  0.1875],
       [ 0.25  ,  0.4375,  0.5   ,  0.4375,  0.25  ],
       [ 0.1875,  0.375 ,  0.4375,  0.375 ,  0.1875],
       [ 0.    ,  0.1875,  0.25  ,  0.1875,  0.    ]])

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pdepy-1.0.0a1.tar.gz (4.5 kB view hashes)

Uploaded Source

Built Distribution

pdepy-1.0.0a1-py3-none-any.whl (8.4 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page