py-pde

py-pde: A Python package for solving partial differential equations - Published in JOSS (2020)

https://github.com/zwicker-group/py-pde

Science Score: 95.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
    Found 6 DOI reference(s) in README and JOSS metadata
  • Academic publication links
    Links to: joss.theoj.org
  • Committers with academic emails
    3 of 9 committers (33.3%) from academic institutions
  • Institutional organization owner
  • JOSS paper metadata
    Published in Journal of Open Source Software

Keywords

dynamical-systems finite-difference-method partial-differential-equations pdes python scientific-computing

Keywords from Contributors

galaxies
Last synced: 4 months ago · JSON representation

Repository

Python package for solving partial differential equations using finite differences.

Basic Info
Statistics
  • Stars: 445
  • Watchers: 11
  • Forks: 61
  • Open Issues: 5
  • Releases: 115
Topics
dynamical-systems finite-difference-method partial-differential-equations pdes python scientific-computing
Created almost 6 years ago · Last pushed 5 months ago
Metadata Files
Readme License Code of conduct

README.md

py-pde

PyPI version Conda Version License: MIT Build Status codecov Binder Documentation Status DOI

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!

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 using the conda-forge 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 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

Owner

  • Name: Zwicker Group
  • Login: zwicker-group
  • Kind: organization
  • Location: Göttingen, Germany

Max Planck Research Group "Theory of Biological Physics"

JOSS Publication

py-pde: A Python package for solving partial differential equations
Published
April 03, 2020
Volume 5, Issue 48, Page 2158
Authors
David Zwicker ORCID
Max Planck Institute for Dynamics and Self-Organization, Göttingen, Germany
Editor
Juanjo Bazán ORCID
Tags
partial differential equation dynamical systems finite-difference just-in-time compilation

GitHub Events

Total
  • Create event: 65
  • Issues event: 24
  • Release event: 5
  • Watch event: 38
  • Delete event: 55
  • Issue comment event: 21
  • Push event: 99
  • Pull request review event: 2
  • Pull request review comment event: 2
  • Pull request event: 113
  • Fork event: 8
Last Year
  • Create event: 65
  • Issues event: 25
  • Release event: 5
  • Watch event: 38
  • Delete event: 55
  • Issue comment event: 21
  • Push event: 100
  • Pull request review event: 2
  • Pull request review comment event: 2
  • Pull request event: 113
  • Fork event: 8

Committers

Last synced: 5 months ago

All Time
  • Total Commits: 1,210
  • Total Committers: 9
  • Avg Commits per committer: 134.444
  • Development Distribution Score (DDS): 0.011
Past Year
  • Commits: 102
  • Committers: 1
  • Avg Commits per committer: 102.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
David Zwicker d****r@d****e 1,197
Juanjo Bazán j****n@g****m 3
evidalh e****l@d****e 3
Daniel S. Katz d****z@i****g 2
noah-ziethen 5****n 1
lmenou m****9@g****m 1
Johannes Krausser j****r@p****e 1
Estefania Vidal t****l@g****m 1
Diego Volpatto d****o@e****o 1
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 4 months ago

All Time
  • Total issues: 70
  • Total pull requests: 395
  • Average time to close issues: 17 days
  • Average time to close pull requests: about 13 hours
  • Total issue authors: 37
  • Total pull request authors: 1
  • Average comments per issue: 1.39
  • Average comments per pull request: 0.19
  • Merged pull requests: 381
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 19
  • Pull requests: 128
  • Average time to close issues: 13 days
  • Average time to close pull requests: about 8 hours
  • Issue authors: 6
  • Pull request authors: 1
  • Average comments per issue: 0.47
  • Average comments per pull request: 0.02
  • Merged pull requests: 120
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • david-zwicker (31)
  • yohad (3)
  • Benj-Ward (2)
  • parsarahimi (1)
  • ReHoss (1)
  • icarosadero (1)
  • qingpowuwu (1)
  • kallegrens (1)
  • ChengXiaoSi (1)
  • hxwe (1)
  • vnikoofard (1)
  • OliverPaulin (1)
  • tranqui (1)
  • risinggard (1)
  • martin-phys (1)
Pull Request Authors
  • david-zwicker (395)
Top Labels
Issue Labels
enhancement (25) refactor (1) bug (1)
Pull Request Labels

Packages

  • Total packages: 2
  • Total downloads:
    • pypi 5,137 last-month
  • Total docker downloads: 115
  • Total dependent packages: 4
    (may contain duplicates)
  • Total dependent repositories: 8
    (may contain duplicates)
  • Total versions: 154
  • Total maintainers: 1
pypi.org: py-pde

Python package for solving partial differential equations

  • Versions: 118
  • Dependent Packages: 3
  • Dependent Repositories: 8
  • Downloads: 5,137 Last month
  • Docker Downloads: 115
Rankings
Docker downloads count: 3.0%
Dependent packages count: 3.2%
Average: 4.7%
Dependent repos count: 5.2%
Downloads: 7.5%
Maintainers (1)
Last synced: 4 months ago
conda-forge.org: py-pde

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.

  • Versions: 36
  • Dependent Packages: 1
  • Dependent Repositories: 0
Rankings
Stargazers count: 23.8%
Forks count: 25.9%
Average: 28.1%
Dependent packages count: 28.8%
Dependent repos count: 34.0%
Last synced: 4 months ago

Dependencies

.github/workflows/check_docs.yml actions
  • actions/checkout v3 composite
  • ammaraskar/sphinx-action master composite
.github/workflows/codeql-analysis.yml actions
  • actions/checkout v3 composite
  • github/codeql-action/analyze v2 composite
  • github/codeql-action/autobuild v2 composite
  • github/codeql-action/init v2 composite
.github/workflows/coverage_report.yml actions
  • actions/checkout v3 composite
  • actions/setup-python v4 composite
  • codecov/codecov-action v1 composite
  • mpi4py/setup-mpi v1 composite
.github/workflows/release_pip.yml actions
  • actions/checkout v3 composite
  • actions/setup-python v4 composite
.github/workflows/tests_all.yml actions
  • actions/checkout v3 composite
  • actions/setup-python v4 composite
.github/workflows/tests_minversion.yml actions
  • actions/checkout v3 composite
  • actions/setup-python v4 composite
.github/workflows/tests_mpi.yml actions
  • actions/checkout v3 composite
  • actions/setup-python v4 composite
  • mpi4py/setup-mpi v1 composite
.github/workflows/tests_types.yml actions
  • actions/checkout v3 composite
  • actions/setup-python v4 composite
docs/requirements.txt pypi
  • Pillow >=7.0
  • Sphinx >=4
  • h5py >=2.10
  • pandas >=1.2
  • sphinx-autodoc-annotation >=1.0
  • sphinx-gallery >=0.6
  • sphinx-rtd-theme >=1
requirements.txt pypi
  • matplotlib >=3.1.0
  • numba >=0.56.0
  • numpy >=1.22.0,<1.24
  • scipy >=1.4.0
  • sympy >=1.5.0
  • tqdm >=4.60
tests/requirements.txt pypi
  • black >=19. test
  • isort >=5.1 test
  • jupyter_contrib_nbextensions >=0.5 test
  • mypy >=0.770 test
  • pyinstrument >=3 test
  • pytest >=5.4 test
  • pytest-cov >=2.8 test
  • pytest-xdist >=1.30 test
tests/requirements_full.txt pypi
  • h5py >=2.10 test
  • matplotlib >=3.1.0 test
  • numba >=0.56.0 test
  • numpy >=1.22.0,<1.24 test
  • pandas >=1.2 test
  • pyfftw >=0.12 test
  • scipy >=1.4.0 test
  • sympy >=1.5.0 test
  • tqdm >=4.60 test
tests/requirements_min.txt pypi
  • matplotlib * test
  • numba * test
  • numpy * test
  • scipy * test
  • sympy * test
  • tqdm * test
tests/requirements_mpi.txt pypi
  • h5py >=2.10 test
  • matplotlib >=3.1.0 test
  • mpi4py >=3 test
  • numba >=0.56.0 test
  • numba-mpi >=0.22 test
  • numpy >=1.22.0,<1.24 test
  • pandas >=1.2 test
  • scipy >=1.4.0 test
  • sympy >=1.5.0 test
  • tqdm >=4.60 test
pde/tools/resources/requirements_basic.txt pypi
  • matplotlib >=3.1.0
  • numba >=0.56.0
  • numpy >=1.22.0
  • scipy >=1.10.0
  • sympy >=1.9.0
  • tqdm >=4.60
pde/tools/resources/requirements_full.txt pypi
  • h5py >=2.10
  • matplotlib >=3.1.0
  • numba >=0.56.0
  • numpy >=1.22.0
  • pandas >=1.2
  • pyfftw >=0.12
  • rocket-fft >=0.2
  • scipy >=1.10.0
  • sympy >=1.9.0
  • tqdm >=4.60
pde/tools/resources/requirements_mpi.txt pypi
  • h5py >=2.10
  • matplotlib >=3.1.0
  • mpi4py >=3
  • numba >=0.56.0
  • numba-mpi >=0.22
  • numpy >=1.22.0
  • pandas >=1.2
  • scipy >=1.10.0
  • sympy >=1.9.0
  • tqdm >=4.60
pyproject.toml pypi
  • matplotlib >=3.1.0
  • numba >=0.56.0
  • numpy >=1.22.0
  • scipy >=1.10.0
  • sympy >=1.9.0
  • tqdm >=4.60
scripts/_templates/pyproject.toml pypi