Skip to main content

Library for building model order reduction applications with Python

Project description

pyMOR Logo

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

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

We recommend installation of pyMOR in a virtual environment.

pyMOR can easily be installed with the pip command. Please note that pip versions prior to 21.1 might have problems resolving all dependencies, so running the following first is recommended:

pip install --upgrade pip

If you are not operating in a virtual environment, you can pass the optional --user argument to pip. pyMOR will then only be installed for your local user, not requiring administrator privileges.

Latest Release (without Optional Dependencies)

For an installation with minimal dependencies, run

pip install pymor

Note that most included demo scripts additionally require Qt bindings such as pyside2 to function. Therefore we recommend install pyMOR with the gui extra:

pip install pymor[gui]  # 2023.1 and later

Latest Release (with all Optional Dependencies)

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

pip install pymor[full]

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
    

Latest Development Version

To install the latest development version of pyMOR, execute

pip install 'pymor[full] @ git+https://github.com/pymor/pymor'

which requires that the git version control system is installed on your system.

Current Release Branch Version

From time to time, the main branch of pyMOR undergoes major changes and things might break (this is usually announced in our discussion forum), so you might prefer to install pyMOR from the current release branch:

pip install 'pymor[full] @ git+https://github.com/pymor/pymor@2023.2.x'

Release branches will always stay stable and will only receive bugfix commits after the corresponding release has been made.

Installation via conda

We recommend installation of pyMOR in a conda environment.

pyMOR can be installed using conda by running

conda install -c conda-forge 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

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

pymor-2023.2.0.tar.gz (724.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pymor-2023.2.0-py3-none-any.whl (582.6 kB view details)

Uploaded Python 3

File details

Details for the file pymor-2023.2.0.tar.gz.

File metadata

  • Download URL: pymor-2023.2.0.tar.gz
  • Upload date:
  • Size: 724.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-httpx/0.25.2

File hashes

Hashes for pymor-2023.2.0.tar.gz
Algorithm Hash digest
SHA256 ff679e74a99530b9e24dd2afb16cece8bc86638159e9d70eff22447832b63629
MD5 ae0d3b53887a03ef05be6b12f9bee251
BLAKE2b-256 334450d0c4c56d3a315c66618819077297ba0c74ce58600bda1f7a767cdb1ef3

See more details on using hashes here.

File details

Details for the file pymor-2023.2.0-py3-none-any.whl.

File metadata

  • Download URL: pymor-2023.2.0-py3-none-any.whl
  • Upload date:
  • Size: 582.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-httpx/0.25.2

File hashes

Hashes for pymor-2023.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7832f4f91287710e852cd2b925b7b185b55d11b01c207370fd455b46a7667e9c
MD5 129ddca1df6658ef8e9f27b3cde91741
BLAKE2b-256 f3e372b2e8a22767495df4e9e0f2de2d61e772215d26e03d6c11b25ee84a32ee

See more details on using hashes here.

Supported by

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