pymor

pyMOR - Model Order Reduction with Python

https://github.com/pymor/pymor

Science Score: 77.0%

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

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
    Found 1 DOI reference(s) in README
  • Academic publication links
    Links to: zenodo.org
  • Committers with academic emails
    15 of 32 committers (46.9%) from academic institutions
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (16.1%) to scientific vocabulary

Keywords

control-systems data-driven dealii dune empirical-interpolation fenics model-order-reduction model-reduction ngsolve nonlinear-dynamics parametric python reduced-basis state-space
Last synced: 4 months ago · JSON representation ·

Repository

pyMOR - Model Order Reduction with Python

Basic Info
  • Host: GitHub
  • Owner: pymor
  • License: other
  • Language: Python
  • Default Branch: main
  • Homepage: https://pymor.org
  • Size: 41.1 MB
Statistics
  • Stars: 325
  • Watchers: 18
  • Forks: 116
  • Open Issues: 119
  • Releases: 22
Topics
control-systems data-driven dealii dune empirical-interpolation fenics model-order-reduction model-reduction ngsolve nonlinear-dynamics parametric python reduced-basis state-space
Created almost 13 years ago · Last pushed 4 months ago
Metadata Files
Readme Contributing License Code of conduct Citation Security Authors

README.md

pyMOR Logo

PyPI PyPI Docs DOI GitLab Pipeline Conda Tests codecov pre-commit.ci status Affiliated with NumFOCUS

pyMOR - Model Order Reduction with Python

pyMOR is a software library for building model order reduction applications with the Python programming language. All algorithms in pyMOR are formulated in terms of abstract interfaces, allowing generic implementations to work with different backends, from NumPy/SciPy to external partial differential equation solver packages.

Features

  • Reduced basis methods for parametric linear and non-linear problems.
  • System-theoretic methods for linear time-invariant systems.
  • Neural network-based methods for parametric problems.
  • Proper orthogonal decomposition.
  • Dynamic mode decomposition.
  • Rational interpolation of data (Loewner, AAA).
  • Numerical linear algebra (Gram-Schmidt, time-stepping, ...).
  • Pure Python implementations of finite element and finite volume discretizations using the NumPy/SciPy scientific computing stack.

License

pyMOR is licensed under BSD-2-clause. See LICENSE.txt.

Citing

If you use pyMOR for academic work, please consider citing our publication:

R. Milk, S. Rave, F. Schindler
pyMOR - Generic Algorithms and Interfaces for Model Order Reduction
SIAM J. Sci. Comput., 38(5), pp. S194--S216, 2016

Installation via pip

pyMOR can easily be installed using Python package managers like pip. We recommend installation of pyMOR into a virtual environment to avoid dependency conflicts.

For an installation with minimal dependencies, run

pip install pymor

Since most included demo scripts require Qt bindings such as pyside6 to function, we recommend install pyMOR with the gui extra:

pip install 'pymor[gui]'

The following installs the latest release of pyMOR on your system with most optional dependencies:

pip install 'pymor[full]'

To obtain an environment with the exact same package versions used in our Linux continuous integration tests, you can use the requirements-ci-current.txt, file from the pyMOR repository

pip install -r requirements-ci-current.txt
pip install pymor

If you are using a stable release, you should download the file from the corresponding release branch of the repository.

Additional dependencies

There are some optional packages not included with pymor[full] because they need additional setup on your system:

  • mpi4py: support of MPI distributed models and parallelization of greedy algorithms (requires MPI development headers and a C compiler):

    pip install mpi4py

  • Slycot: dense matrix equation solvers for system-theoretic methods and H-infinity norm calculation (requires OpenBLAS headers and a Fortran compiler):

    pip install slycot

Note that building Slycot might fail for the following reasons:

  • The Slycot package contains a cmake check which fails when it detects multiply NumPy include directories. This will cause the build to fail in venvs with any Python interpreter that has NumPy globally installed. To circumvent this problem, use another Python interpreter. If you do not want to build CPython yourself, you can use pyenv, uv or mise-en-place to easily install another interpreter.
  • Slycot's build environment contains numpy>=2. However, scikit-builds's FindF2PY.cmake will select any globally installed f2py3 executable to generate the Fortran wrapper code. On most systems, an older NumPy version is installed, whose f2py will generate incorrect wrapper code for numpy>=2. To mitigate this issue, install numpy>=2 into your venv and link f2py3 to f2py its /bin directory.
  • Building Slycot on Windows is challenging. We recommend using conda-forge packages instead. If you do not want to install the pyMOR conda-forge package, you can also pip install pyMOR into an existing conda environment.

If you are on Linux and don't want to build Slycot yourself, you can try our experimental manylinux wheels for Slycot.

Installation via conda

pyMOR is packaged in conda-forge and can be installed by running

conda install -c conda-forge pymor

This will install pyMOR with its core dependencies into the current active conda environment. To replicate an environment with most optional dependencies, which is also used in our continuous integration tests, you can use the conda-linux-64.lock, conda-osx-64.lock, conda-win-64.lock lock files from the pyMOR repository:

conda create -n pymorenv --file ./conda-{linux,osx,win}-64.lock
conda activate pymorenv
conda install pymor

Documentation

Documentation is available online. We recommend starting with getting started, tutorials, and technical overview.

To build the documentation locally, run the following from inside the root directory of the pyMOR source tree:

make docs

This will generate HTML documentation in docs/_build/html.

External PDE Solvers

pyMOR has been designed with easy integration of external PDE solvers in mind.

We provide bindings for the following solver libraries:

  • FEniCS

    MPI-compatible wrapper classes for dolfin linear algebra data structures are shipped with pyMOR (pymor.bindings.fenics). For an example see pymordemos.thermalblock, pymordemos.thermalblock_simple. It is tested using FEniCS version 2019.1.0.

  • deal.II

    Python bindings and pyMOR wrapper classes can be found here.

  • NGSolve

    Wrapper classes for the NGSolve finite element library are shipped with pyMOR (pymor.bindings.ngsolve). For an example see pymordemos.thermalblock_simple. It is tested using NGSolve version v6.2.2104.

A simple example for direct integration of pyMOR with a a custom solver can be found in pymordemos.minimal_cpp_demo.

An alternative approach is to import system matrices from file and use scipy.sparse-based solvers.

Environments for pyMOR Development and Tests

Please see the Developer Documentation.

Contact

Should you have any questions regarding pyMOR or wish to contribute, do not hesitate to send us an email at

main.developers@pymor.org

Owner

  • Name: pyMOR
  • Login: pymor
  • Kind: organization

Citation (CITATION.cff)

---
title: pyMOR
authors:
  - family-names: Fritze
    given-names: René
    orcid: https://orcid.org/0000-0002-9548-2238
  - family-names: Rave
    given-names: Stephan
    orcid: https://orcid.org/0000-0003-0439-7212
  - family-names: Schindler
    given-names: Felix
    orcid: https://orcid.org/0000-0003-1582-7118
  - family-names: Mlinarić
    given-names: Petar
    orcid: https://orcid.org/0000-0002-9437-7698
  - family-names: Balicki
    given-names: Linus
    orcid: https://orcid.org/0000-0002-8901-2889
  - family-names: Kleikamp
    given-names: Hendrik
    orcid: https://orcid.org/0000-0003-1264-5941
cff-version: 1.2.0
preferred-citation:
  title: pyMOR -- Generic Algorithms and Interfaces for Model Order Reduction
  doi: 10.1137/15M1026614
  type: article
  authors:
    - family-names: Milk
      given-names: René
      orcid: https://orcid.org/0000-0002-9548-2238
    - family-names: Rave
      given-names: Stephan
      orcid: https://orcid.org/0000-0003-0439-7212
    - family-names: Schindler
      given-names: Felix
      orcid: https://orcid.org/0000-0003-1582-7118
message: If you use this software, please cite both the article from preferred-citation
  and the software itself.

GitHub Events

Total
  • Create event: 83
  • Release event: 2
  • Issues event: 18
  • Watch event: 15
  • Delete event: 70
  • Issue comment event: 259
  • Push event: 327
  • Pull request review comment event: 66
  • Pull request review event: 85
  • Pull request event: 68
  • Fork event: 7
Last Year
  • Create event: 83
  • Release event: 2
  • Issues event: 18
  • Watch event: 15
  • Delete event: 70
  • Issue comment event: 259
  • Push event: 327
  • Pull request review comment event: 66
  • Pull request review event: 85
  • Pull request event: 68
  • Fork event: 7

Committers

Last synced: almost 3 years ago

All Time
  • Total Commits: 8,239
  • Total Committers: 32
  • Avg Commits per committer: 257.469
  • Development Distribution Score (DDS): 0.566
Top Committers
Name Email Commits
Stephan Rave s****e@u****e 3,573
René Fritze r****e@u****e 2,161
Petar Mlinarić m****c@v****u 1,056
Felix Schindler f****r@n****m 239
Tim Keil t****l@w****e 233
Hendrik Kleikamp h****p@u****e 230
Art Pelling a****g@t****e 200
Linus Balicki b****i@v****u 105
Peter Oehme o****b@g****m 68
Jonas Nicodemus j****s@i****m 57
Patrick Buchfink p****k@i****e 52
dependabot[bot] 4****]@u****m 38
Michael Laier m****1@u****e 36
Andreas Buhr a****s@a****e 26
Meret Behrens m****s@m****e 23
Sven Ullmann u****n@g****e 21
pyMOR Bot b****t@p****g 20
mohamedadelnaguib m****8@g****m 17
Michael Schaefer m****r@u****e 12
bergdoaa a****t@g****m 10
Josefine Zeller j****r@w****e 10
Christian Himpe h****e@m****e 9
Dennis Eickhorn d****n@u****e 9
Magnus Ostertag M****g@u****m 9
Geordie McBain g****n@p****m 7
pre-commit-ci[bot] 6****]@u****m 6
Falk Meyer f****r@u****e 5
Julia Brunken j****n@u****e 2
Monica Dessole m****e@g****m 2
bergdola 1****a@u****m 1
and 2 more...

Issues and Pull Requests

Last synced: 4 months ago

All Time
  • Total issues: 55
  • Total pull requests: 128
  • Average time to close issues: 10 months
  • Average time to close pull requests: about 2 months
  • Total issue authors: 14
  • Total pull request authors: 17
  • Average comments per issue: 0.65
  • Average comments per pull request: 2.59
  • Merged pull requests: 93
  • Bot issues: 1
  • Bot pull requests: 5
Past Year
  • Issues: 15
  • Pull requests: 53
  • Average time to close issues: about 2 months
  • Average time to close pull requests: 26 days
  • Issue authors: 8
  • Pull request authors: 13
  • Average comments per issue: 0.67
  • Average comments per pull request: 2.58
  • Merged pull requests: 36
  • Bot issues: 1
  • Bot pull requests: 2
Top Authors
Issue Authors
  • sdrave (23)
  • pmli (7)
  • renefritze (6)
  • HenKlei (5)
  • artpelling (2)
  • TiPlath (2)
  • lbalicki (2)
  • bkmgit (2)
  • lk1983823 (1)
  • hitotech1221 (1)
  • ftalbrecht (1)
  • dmitry-kabanov (1)
  • maxbindhak (1)
  • pre-commit-ci[bot] (1)
Pull Request Authors
  • sdrave (72)
  • HenKlei (13)
  • pmli (9)
  • artpelling (7)
  • pre-commit-ci[bot] (5)
  • maxbindhak (4)
  • lbalicki (3)
  • TiPlath (2)
  • vaibhav17octo (2)
  • ftschindler (2)
  • dmitry-kabanov (2)
  • renefritze (2)
  • peoe (1)
  • bkmgit (1)
  • drittelhacker (1)
Top Labels
Issue Labels
feature request (25) user meeting 24 (12) bug (10) good first issue (3) infrastructure (2) pr:new-feature (2) pr:fix (1)
Pull Request Labels
pr:fix (39) pr:new-feature (38) pr:change (34) infrastructure (30) pr:removal (10) management (4) feature request (3) user meeting 24 (3) bug (2) automerge (1) backport (1) good first issue (1)

Packages

  • Total packages: 1
  • Total downloads:
    • pypi 509 last-month
  • Total dependent packages: 0
  • Total dependent repositories: 4
  • Total versions: 33
  • Total maintainers: 4
pypi.org: pymor

Library for building model order reduction applications with Python

  • Versions: 33
  • Dependent Packages: 0
  • Dependent Repositories: 4
  • Downloads: 509 Last month
  • Docker Downloads: 0
Rankings
Docker downloads count: 3.8%
Dependent repos count: 7.6%
Average: 8.1%
Dependent packages count: 9.8%
Downloads: 11.0%
Maintainers (4)
Last synced: 4 months ago

Dependencies

.github/actions/miniconda_tests/action.yml actions
  • actions/checkout v3 composite
  • actions/upload-artifact v3 composite
  • mamba-org/provision-with-micromamba v14 composite
.github/workflows/add_labels.yml actions
  • actions-ecosystem/action-add-labels v1.1.3 composite
  • actions/checkout v3 composite
  • actions/labeler v4 composite
.github/workflows/citation.yml actions
  • actions/checkout v3 composite
  • citation-file-format/cffconvert-github-action 2.0.0 composite
.github/workflows/conda_tests.yml actions
  • ./.github/actions/miniconda_tests * composite
  • actions/checkout v3 composite
  • actions/download-artifact v3 composite
  • actions/setup-python v4 composite
  • actions/upload-artifact v3 composite
  • codecov/codecov-action v3 composite
  • conda-incubator/setup-miniconda v2 composite
  • martijnhols/actions-cache/restore v3.0.11 composite
  • styfle/cancel-workflow-action 0.11.0 composite
.github/workflows/enforce-labels.yml actions
  • yogevbd/enforce-label-action 2.2.2 composite
.github/workflows/git_checks.yml actions
  • actions/checkout v3 composite
  • olivernybroe/action-conflict-finder v4.0 composite
  • xt0rted/block-autosquash-commits-action v2 composite
.github/workflows/link_check.yml actions
  • actions/checkout v3 composite
  • renefritze/github-action-markdown-link-check master composite
.github/workflows/conda_cov_upload.yml actions
  • actions/checkout v3 composite
  • codecov/codecov-action v3 composite
  • dawidd6/action-download-artifact v2.24.3 composite
.github/workflows/external_pr_mirror.yml actions
  • actions/checkout v3 composite
  • actions/github-script v6 composite
.github/workflows/external_pr_unmirror.yml actions
  • actions/checkout v3 composite
  • actions/github-script v6 composite
.github/workflows/pyproject_toml_changes.yml actions
  • actions/github-script v6 composite
pyproject.toml pypi
  • diskcache *
  • matplotlib *
  • numpy >=1.20.3,!=1.25.0
  • packaging *
  • pillow *
  • pygments *
  • qtpy >=2.3.1
  • scipy >=1.5.4
  • typer *
requirements-ci-current.txt pypi
  • 196 dependencies
requirements-ci-fenics.txt pypi
  • 117 dependencies
requirements-ci-oldest-pins.in pypi
  • k3d ==2.15.2
  • numpy ==1.20.3
  • scikit-fem ==6.0.0
  • scipy ==1.5.4
  • slycot ==0.5.4
  • torch ==1.11.0
requirements-ci-oldest.txt pypi
  • 195 dependencies