py-pde


Namepy-pde JSON
Version 0.42.1 PyPI version JSON
download
home_pageNone
SummaryPython package for solving partial differential equations
upload_time2024-12-02 18:40:10
maintainerNone
docs_urlNone
authorNone
requires_python<3.13,>=3.9
licenseMIT
keywords pdes partial-differential-equations dynamical-systems
VCS
bugtrack_url
requirements matplotlib numba numpy scipy sympy tqdm
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # py-pde

<img src="docs/source/_images/logo.png" width="200em" align="right" />


[![PyPI version](https://badge.fury.io/py/py-pde.svg)](https://badge.fury.io/py/py-pde)
[![Conda Version](https://img.shields.io/conda/vn/conda-forge/py-pde.svg)](https://anaconda.org/conda-forge/py-pde)
[![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](https://opensource.org/licenses/MIT)
[![Build Status](https://github.com/zwicker-group/py-pde/actions/workflows/tests_all.yml/badge.svg)](https://github.com/zwicker-group/py-pde/actions/workflows/tests_all.yml)
[![codecov](https://codecov.io/gh/zwicker-group/py-pde/branch/master/graph/badge.svg)](https://codecov.io/gh/zwicker-group/py-pde)
[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/zwicker-group/py-pde/master?filepath=examples%2Fjupyter)
[![Documentation Status](https://readthedocs.org/projects/py-pde/badge/?version=latest)](https://py-pde.readthedocs.io/en/latest/?badge=latest)
[![DOI](https://joss.theoj.org/papers/10.21105/joss.02158/status.svg)](https://doi.org/10.21105/joss.02158)

`py-pde` is a Python package for solving partial differential equations (PDEs). 
The package provides classes for grids on which scalar and tensor fields can be
defined. The associated differential operators are computed using a
numba-compiled implementation of finite differences. This allows defining,
inspecting, and solving typical PDEs that appear for instance in the study of
dynamical systems in physics. The focus of the package lies on easy usage to
explore the behavior of PDEs. However, core computations can be compiled
transparently using numba for speed.

[Try it online!](https://mybinder.org/v2/gh/zwicker-group/py-pde/master?filepath=examples%2Fjupyter)


Installation
------------

`py-pde` is available on `pypi`, so you should be able to install it through `pip`:

```bash
pip install py-pde
```

In order to have all features of the package available, you might want to 
install the following optional packages:

```bash
pip install h5py pandas mpi4py numba-mpi
```

Moreover, `ffmpeg` needs to be installed for creating movies.

As an alternative, you can install `py-pde` through [conda](https://docs.conda.io/en/latest/)
using the [conda-forge](https://conda-forge.org/) channel:

```bash
conda install -c conda-forge py-pde
```

Installation with `conda` includes all dependencies of `py-pde`.

Usage
-----

A simple example showing the evolution of the diffusion equation in 2d:

```python
import pde

grid = pde.UnitGrid([64, 64])                 # generate grid
state = pde.ScalarField.random_uniform(grid)  # generate initial condition

eq = pde.DiffusionPDE(diffusivity=0.1)        # define the pde
result = eq.solve(state, t_range=10)          # solve the pde
result.plot()                                 # plot the resulting field
```

PDEs can also be specified by simply writing expressions of the evolution rate.
For instance, the
[Cahn-Hilliard equation](https://en.wikipedia.org/wiki/Cahn–Hilliard_equation)
can be implemented as
```python
eq = pde.PDE({'c': 'laplace(c**3 - c - laplace(c))'})
```
which can be used in place of the `DiffusionPDE` in the example above.


More information
----------------
* Tutorial notebooks in the [tutorials folder](https://github.com/zwicker-group/py-pde/tree/master/examples/tutorial)
* [Examples gallery](https://py-pde.readthedocs.io/en/latest/examples_gallery/)
  with an overview of the capabilities of the package
* The [Discussions on GitHub](https://github.com/zwicker-group/py-pde/discussions)
* [Full documentation on readthedocs](https://py-pde.readthedocs.io/)
  or as [a single PDF file](https://py-pde.readthedocs.io/_/downloads/en/latest/pdf/).
* The [paper published in the Journal of Open Source Software](https://doi.org/10.21105/joss.02158)
* [Practical tutorial on pattern formation in biological cells](https://github.com/zwicker-group/tutorial-pattern-formation-in-cells)

 

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "py-pde",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<3.13,>=3.9",
    "maintainer_email": null,
    "keywords": "pdes, partial-differential-equations, dynamical-systems",
    "author": null,
    "author_email": "David Zwicker <david.zwicker@ds.mpg.de>",
    "download_url": "https://files.pythonhosted.org/packages/07/f5/85467b920590e232e27f23e02b12a57b07adcc60c636d0090afacc9998b4/py_pde-0.42.1.tar.gz",
    "platform": null,
    "description": "# py-pde\n\n<img src=\"docs/source/_images/logo.png\" width=\"200em\" align=\"right\" />\n\n\n[![PyPI version](https://badge.fury.io/py/py-pde.svg)](https://badge.fury.io/py/py-pde)\n[![Conda Version](https://img.shields.io/conda/vn/conda-forge/py-pde.svg)](https://anaconda.org/conda-forge/py-pde)\n[![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](https://opensource.org/licenses/MIT)\n[![Build Status](https://github.com/zwicker-group/py-pde/actions/workflows/tests_all.yml/badge.svg)](https://github.com/zwicker-group/py-pde/actions/workflows/tests_all.yml)\n[![codecov](https://codecov.io/gh/zwicker-group/py-pde/branch/master/graph/badge.svg)](https://codecov.io/gh/zwicker-group/py-pde)\n[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/zwicker-group/py-pde/master?filepath=examples%2Fjupyter)\n[![Documentation Status](https://readthedocs.org/projects/py-pde/badge/?version=latest)](https://py-pde.readthedocs.io/en/latest/?badge=latest)\n[![DOI](https://joss.theoj.org/papers/10.21105/joss.02158/status.svg)](https://doi.org/10.21105/joss.02158)\n\n`py-pde` is a Python package for solving partial differential equations (PDEs). \nThe package provides classes for grids on which scalar and tensor fields can be\ndefined. The associated differential operators are computed using a\nnumba-compiled implementation of finite differences. This allows defining,\ninspecting, and solving typical PDEs that appear for instance in the study of\ndynamical systems in physics. The focus of the package lies on easy usage to\nexplore the behavior of PDEs. However, core computations can be compiled\ntransparently using numba for speed.\n\n[Try it online!](https://mybinder.org/v2/gh/zwicker-group/py-pde/master?filepath=examples%2Fjupyter)\n\n\nInstallation\n------------\n\n`py-pde` is available on `pypi`, so you should be able to install it through `pip`:\n\n```bash\npip install py-pde\n```\n\nIn order to have all features of the package available, you might want to \ninstall the following optional packages:\n\n```bash\npip install h5py pandas mpi4py numba-mpi\n```\n\nMoreover, `ffmpeg` needs to be installed for creating movies.\n\nAs an alternative, you can install `py-pde` through [conda](https://docs.conda.io/en/latest/)\nusing the [conda-forge](https://conda-forge.org/) channel:\n\n```bash\nconda install -c conda-forge py-pde\n```\n\nInstallation with `conda` includes all dependencies of `py-pde`.\n\nUsage\n-----\n\nA simple example showing the evolution of the diffusion equation in 2d:\n\n```python\nimport pde\n\ngrid = pde.UnitGrid([64, 64])                 # generate grid\nstate = pde.ScalarField.random_uniform(grid)  # generate initial condition\n\neq = pde.DiffusionPDE(diffusivity=0.1)        # define the pde\nresult = eq.solve(state, t_range=10)          # solve the pde\nresult.plot()                                 # plot the resulting field\n```\n\nPDEs can also be specified by simply writing expressions of the evolution rate.\nFor instance, the\n[Cahn-Hilliard equation](https://en.wikipedia.org/wiki/Cahn\u2013Hilliard_equation)\ncan be implemented as\n```python\neq = pde.PDE({'c': 'laplace(c**3 - c - laplace(c))'})\n```\nwhich can be used in place of the `DiffusionPDE` in the example above.\n\n\nMore information\n----------------\n* Tutorial notebooks in the [tutorials folder](https://github.com/zwicker-group/py-pde/tree/master/examples/tutorial)\n* [Examples gallery](https://py-pde.readthedocs.io/en/latest/examples_gallery/)\n  with an overview of the capabilities of the package\n* The [Discussions on GitHub](https://github.com/zwicker-group/py-pde/discussions)\n* [Full documentation on readthedocs](https://py-pde.readthedocs.io/)\n  or as [a single PDF file](https://py-pde.readthedocs.io/_/downloads/en/latest/pdf/).\n* The [paper published in the Journal of Open Source Software](https://doi.org/10.21105/joss.02158)\n* [Practical tutorial on pattern formation in biological cells](https://github.com/zwicker-group/tutorial-pattern-formation-in-cells)\n\n \n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Python package for solving partial differential equations",
    "version": "0.42.1",
    "project_urls": {
        "documentation": "http://py-pde.readthedocs.io",
        "homepage": "https://github.com/zwicker-group/py-pde",
        "repository": "https://github.com/zwicker-group/py-pde"
    },
    "split_keywords": [
        "pdes",
        " partial-differential-equations",
        " dynamical-systems"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "c12b1cf4268ddccd323d4fac215eb594ac41c74e39dd46290effca7460067307",
                "md5": "53101904d0588fe6361db25ab8450ae7",
                "sha256": "8ebf1cae1e82f808c6775143bf5d230ddde42773b884a39c24c073c93fa1a1aa"
            },
            "downloads": -1,
            "filename": "py_pde-0.42.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "53101904d0588fe6361db25ab8450ae7",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<3.13,>=3.9",
            "size": 328651,
            "upload_time": "2024-12-02T18:40:08",
            "upload_time_iso_8601": "2024-12-02T18:40:08.452915Z",
            "url": "https://files.pythonhosted.org/packages/c1/2b/1cf4268ddccd323d4fac215eb594ac41c74e39dd46290effca7460067307/py_pde-0.42.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "07f585467b920590e232e27f23e02b12a57b07adcc60c636d0090afacc9998b4",
                "md5": "9627795e418feea1dca0152d17ebd277",
                "sha256": "0d46304bd0a64c977ffa5dd02b5004a07885a1e362c2efc4768327e0e6315f16"
            },
            "downloads": -1,
            "filename": "py_pde-0.42.1.tar.gz",
            "has_sig": false,
            "md5_digest": "9627795e418feea1dca0152d17ebd277",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<3.13,>=3.9",
            "size": 1647089,
            "upload_time": "2024-12-02T18:40:10",
            "upload_time_iso_8601": "2024-12-02T18:40:10.528881Z",
            "url": "https://files.pythonhosted.org/packages/07/f5/85467b920590e232e27f23e02b12a57b07adcc60c636d0090afacc9998b4/py_pde-0.42.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-12-02 18:40:10",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "zwicker-group",
    "github_project": "py-pde",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [
        {
            "name": "matplotlib",
            "specs": [
                [
                    ">=",
                    "3.1"
                ]
            ]
        },
        {
            "name": "numba",
            "specs": [
                [
                    ">=",
                    "0.59"
                ]
            ]
        },
        {
            "name": "numpy",
            "specs": [
                [
                    ">=",
                    "1.22"
                ]
            ]
        },
        {
            "name": "scipy",
            "specs": [
                [
                    ">=",
                    "1.10"
                ]
            ]
        },
        {
            "name": "sympy",
            "specs": [
                [
                    ">=",
                    "1.9"
                ]
            ]
        },
        {
            "name": "tqdm",
            "specs": [
                [
                    ">=",
                    "4.66"
                ]
            ]
        }
    ],
    "lcname": "py-pde"
}
        
Elapsed time: 0.62213s