Skip to main content

No project description provided

Project description

pyMOR - Model Order Reduction with Python

pyMOR is a software library for building model order reduction applications with the Python programming language. Implemented algorithms include reduced basis methods for parametric linear and non-linear problems, as well as system-theoretic methods such as balanced truncation or IRKA (Iterative Rational Krylov Algorithm). All algorithms in pyMOR are formulated in terms of abstract interfaces for seamless integration with external PDE (Partial Differential Equation) solver packages. Moreover, pure Python implementations of FEM (Finite Element Method) and FVM (Finite Volume Method) discretizations using the NumPy/SciPy scientific computing stack are provided for getting started quickly.

PyPI PyPI Docs DOI GitLab Pipeline Azure Pipeline

License

Copyright 2013-2020 pyMOR developers and contributors. All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  • Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
  • Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

The following files contain source code originating from other open source software projects:

  • docs/source/pymordocstring.py (sphinxcontrib-napoleon)
  • src/pymor/algorithms/genericsolvers.py (SciPy)

See these files for more information.

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:

pip install --upgrade pip  # make sure that pip is reasonably new
pip install pymor[full]

(Please note that pip must be at least version 9.0.0)

This will install the latest release of pyMOR on your system with most optional dependencies. For Linux we provide binary wheels, so no further system packages should be required. Use

pip install pymor

for an installation with minimal dependencies. There are some optional packages not included with pymor[full] because they need additional setup on your system:

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

    pip install mpi4py
    
  • dense matrix equation solver for system-theoretic MOR methods, required for H-infinity norm calculation (requires OpenBLAS headers and a Fortran compiler):

    pip install slycot
    
  • dense and sparse matrix equation solver for system-theoretic MOR methods (other backends available):

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.

To install the latest development version of pyMOR, execute

pip install git+https://github.com/pymor/pymor#egg=pymor[full]

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

From time to time, the master branch of pyMOR undergoes major changes and things might break (this is usually announced on our mailing list), so you might prefer to install pyMOR from the current release branch:

pip install git+https://github.com/pymor/pymor@2020.1.x#egg=pymor[full]

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

Installation via conda

pyMOR can be installed using conda by running

conda install -c conda-forge pymor

Documentation

Documentation is available online at Read the Docs or you can build it yourself from inside the root directory of the pyMOR source tree by executing:

make docs

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

Useful Links

External PDE solvers

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

A basic approach is to use the solver only to generate high-dimensional system matrices which are then read by pyMOR from disk (pymor.discretizers.disk). Another possibility is to steer the solver via an appropriate network protocol.

Whenever possible, we recommend to recompile the solver as a Python extension module which gives pyMOR direct access to the solver without any communication overhead. A basic example using pybind11 can be found in src/pymordemos/minimal_cpp_demo. Moreover, 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.thermalbock, pymordemos.thermalblock_simple. It is tested using 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 version v6.2.2006.

Do not hesitate to contact us if you need help with the integration of your PDE solver.

External Matrix Equation Solvers

pyMOR also provides bindings to matrix equation solvers (in pymor.bindings), which are needed for the system-theoretic methods and need to be installed separately. Bindings for the following solver libraries are included:

  • Py-M.E.S.S.

    The Matrix Equation Sparse Solver library is intended for solving large sparse matrix equations (pymor.bindings.pymess).

  • Slycot

    Python wrapper for the Subroutine Library in Systems and Control Theory (SLICOT) is also used for Hardy norm computations (pymor.bindings.slycot).

Setting up an Environment for pyMOR Development

If you already installed a pyMOR release version, please uninstall it

pip uninstall pyMOR

Then, clone the pyMOR git repository using

git clone https://github.com/pymor/pymor $PYMOR_SOURCE_DIR
cd $PYMOR_SOURCE_DIR

and, optionally, switch to the branch you are interested in, e.g.

git checkout 2020.1.x

Then, make an editable installation of pyMOR with

pip install -e .[full]

Tests

pyMOR uses pytest for unit testing. To run the test suite, simply execute make test in the base directory of the pyMOR repository. This will run the pytest suite with the default hypothesis profile "dev". For available profiles see src/pymortests/conftest.py. A profile is selected by running make PYMOR_HYPOTHESIS_PROFILE=PROFILE_NAME test. If docker is available, use make PYMOR_HYPOTHESIS_PROFILE=PROFILE_NAME docker_test to execute the test suite in the same environment as on pyMOR's CI infrastructure. Additional customization points are listed at the top of the Makefile. Run make full-test which will also enable pyflakes and pep8 checks.

All tests are contained within the src/pymortests directory and can be run individually by executing py.test src/pymortests/the_module.py.

Contact

Should you have any questions regarding pyMOR or wish to contribute, do not hestitate to contact us via our development mailing list:

http://listserv.uni-muenster.de/mailman/listinfo/pymor-dev

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-2020.1.1.tar.gz (761.1 kB view details)

Uploaded Source

Built Distributions

pymor-2020.1.1-cp38-cp38-manylinux2014_x86_64.whl (814.9 kB view details)

Uploaded CPython 3.8

pymor-2020.1.1-cp38-cp38-manylinux2010_x86_64.whl (835.5 kB view details)

Uploaded CPython 3.8 manylinux: glibc 2.12+ x86-64

pymor-2020.1.1-cp38-cp38-manylinux1_x86_64.whl (758.3 kB view details)

Uploaded CPython 3.8

pymor-2020.1.1-cp37-cp37m-manylinux2014_x86_64.whl (793.7 kB view details)

Uploaded CPython 3.7m

pymor-2020.1.1-cp37-cp37m-manylinux2010_x86_64.whl (808.0 kB view details)

Uploaded CPython 3.7m manylinux: glibc 2.12+ x86-64

pymor-2020.1.1-cp37-cp37m-manylinux1_x86_64.whl (749.2 kB view details)

Uploaded CPython 3.7m

pymor-2020.1.1-cp36-cp36m-manylinux2014_x86_64.whl (789.8 kB view details)

Uploaded CPython 3.6m

pymor-2020.1.1-cp36-cp36m-manylinux2010_x86_64.whl (804.2 kB view details)

Uploaded CPython 3.6m manylinux: glibc 2.12+ x86-64

pymor-2020.1.1-cp36-cp36m-manylinux1_x86_64.whl (789.8 kB view details)

Uploaded CPython 3.6m

File details

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

File metadata

  • Download URL: pymor-2020.1.1.tar.gz
  • Upload date:
  • Size: 761.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.4.2 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.8.0 tqdm/4.30.0 CPython/3.8.2

File hashes

Hashes for pymor-2020.1.1.tar.gz
Algorithm Hash digest
SHA256 d4b72fd3bc793fb438cfd379941fb36982740942ec70c8db1e2a5e10f6423beb
MD5 99e7bb240d1fcb5303ee3c66c20b0311
BLAKE2b-256 bd3db4fadc05baac0f0ff050577355c09b7d23f4b3e9ba8967efbf83d95a3837

See more details on using hashes here.

Provenance

File details

Details for the file pymor-2020.1.1-cp38-cp38-manylinux2014_x86_64.whl.

File metadata

  • Download URL: pymor-2020.1.1-cp38-cp38-manylinux2014_x86_64.whl
  • Upload date:
  • Size: 814.9 kB
  • Tags: CPython 3.8
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.4.2 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.8.0 tqdm/4.30.0 CPython/3.8.2

File hashes

Hashes for pymor-2020.1.1-cp38-cp38-manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 8ad5ed75d8b50494718ff612a09f498d3972bdbace0271bb2489a455d11b4da6
MD5 4a3df4b693791d00ffc2824ca9fca4ff
BLAKE2b-256 00c90a611faa72623f76dd05400c190857aba12cf7128b7293a0c0728d3c1120

See more details on using hashes here.

Provenance

File details

Details for the file pymor-2020.1.1-cp38-cp38-manylinux2010_x86_64.whl.

File metadata

  • Download URL: pymor-2020.1.1-cp38-cp38-manylinux2010_x86_64.whl
  • Upload date:
  • Size: 835.5 kB
  • Tags: CPython 3.8, manylinux: glibc 2.12+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.4.2 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.8.0 tqdm/4.30.0 CPython/3.8.2

File hashes

Hashes for pymor-2020.1.1-cp38-cp38-manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 ee79ebf152345eb3c06d2af5cfe607dd22adfd1f7e7d32e3c9a581a237f18b9e
MD5 e250e933e8cb0dbe4de0026032f0afb6
BLAKE2b-256 deb54b8847e8ff29aa522d24e5dc61f295a00969c6fcde35353bef78c9103a66

See more details on using hashes here.

Provenance

File details

Details for the file pymor-2020.1.1-cp38-cp38-manylinux1_x86_64.whl.

File metadata

  • Download URL: pymor-2020.1.1-cp38-cp38-manylinux1_x86_64.whl
  • Upload date:
  • Size: 758.3 kB
  • Tags: CPython 3.8
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.4.2 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.8.0 tqdm/4.30.0 CPython/3.8.2

File hashes

Hashes for pymor-2020.1.1-cp38-cp38-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 fcfef1a0836cf8cf6c4830e0f160e412b3d4d0523c9725ce50011b21f6f84c8b
MD5 df0734e5924de1f7077f24a14b355f9b
BLAKE2b-256 294df715a546e472ee3e8674f1efcf5f8ef77f3d3854b21caef82ea29dd512f1

See more details on using hashes here.

Provenance

File details

Details for the file pymor-2020.1.1-cp37-cp37m-manylinux2014_x86_64.whl.

File metadata

  • Download URL: pymor-2020.1.1-cp37-cp37m-manylinux2014_x86_64.whl
  • Upload date:
  • Size: 793.7 kB
  • Tags: CPython 3.7m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.4.2 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.8.0 tqdm/4.30.0 CPython/3.8.2

File hashes

Hashes for pymor-2020.1.1-cp37-cp37m-manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 e75988ab4cf94a6c378ccfb530e7f1f97ed3b6537a74211d5d02553d2bca82e6
MD5 0d79d884c57a3891644463060a8bc087
BLAKE2b-256 3cf14c0136f057d982c48cf4a6d5c3fdf008e78b697d19c06d4d83fbf1cdbe71

See more details on using hashes here.

Provenance

File details

Details for the file pymor-2020.1.1-cp37-cp37m-manylinux2010_x86_64.whl.

File metadata

  • Download URL: pymor-2020.1.1-cp37-cp37m-manylinux2010_x86_64.whl
  • Upload date:
  • Size: 808.0 kB
  • Tags: CPython 3.7m, manylinux: glibc 2.12+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.4.2 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.8.0 tqdm/4.30.0 CPython/3.8.2

File hashes

Hashes for pymor-2020.1.1-cp37-cp37m-manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 e6178d239c6e207555a4ff6456e7947c6968f7c1103d18d3b0d6976422ad6a51
MD5 a8bf7e80f9f0802833e866d544e21a23
BLAKE2b-256 d479b43a9723973ff6d688afb1237aa6e8b95df7c3babfb4f15a80dae7ad49c5

See more details on using hashes here.

Provenance

File details

Details for the file pymor-2020.1.1-cp37-cp37m-manylinux1_x86_64.whl.

File metadata

  • Download URL: pymor-2020.1.1-cp37-cp37m-manylinux1_x86_64.whl
  • Upload date:
  • Size: 749.2 kB
  • Tags: CPython 3.7m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.4.2 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.8.0 tqdm/4.30.0 CPython/3.8.2

File hashes

Hashes for pymor-2020.1.1-cp37-cp37m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 e9c6e7c345bfd20688fc3e899926fbd2b8390a2f96084b0d7fbb4be3e5cfce3a
MD5 16b53f303da74f306276d0fe0becebad
BLAKE2b-256 16692cf4bfbb9283d953e18269b305e65658f712d2ef4a070f3dbc0e8847125c

See more details on using hashes here.

Provenance

File details

Details for the file pymor-2020.1.1-cp36-cp36m-manylinux2014_x86_64.whl.

File metadata

  • Download URL: pymor-2020.1.1-cp36-cp36m-manylinux2014_x86_64.whl
  • Upload date:
  • Size: 789.8 kB
  • Tags: CPython 3.6m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.4.2 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.8.0 tqdm/4.30.0 CPython/3.8.2

File hashes

Hashes for pymor-2020.1.1-cp36-cp36m-manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 ff14eabf3440d9bb080f3799364447ac33e396e695138b33ad8b1a25a69327ef
MD5 b6947475b664b4e985bcc2d71560644f
BLAKE2b-256 2787a60822b2ee33d2580be7e365f8dc8c472742a8b2942760f6fc63b7c6cf1c

See more details on using hashes here.

Provenance

File details

Details for the file pymor-2020.1.1-cp36-cp36m-manylinux2010_x86_64.whl.

File metadata

  • Download URL: pymor-2020.1.1-cp36-cp36m-manylinux2010_x86_64.whl
  • Upload date:
  • Size: 804.2 kB
  • Tags: CPython 3.6m, manylinux: glibc 2.12+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.4.2 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.8.0 tqdm/4.30.0 CPython/3.8.2

File hashes

Hashes for pymor-2020.1.1-cp36-cp36m-manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 87207c83b2d126b46d963108a4375409b50a6772a9938249f733942caff49219
MD5 f52ce04701e1374f7ed3e53ac0e3eed8
BLAKE2b-256 ac5e8802cb7dab2dccc5a36f21422e1df2beb66ad9e6c7b9038bddde698c49e8

See more details on using hashes here.

Provenance

File details

Details for the file pymor-2020.1.1-cp36-cp36m-manylinux1_x86_64.whl.

File metadata

  • Download URL: pymor-2020.1.1-cp36-cp36m-manylinux1_x86_64.whl
  • Upload date:
  • Size: 789.8 kB
  • Tags: CPython 3.6m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.4.2 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.8.0 tqdm/4.30.0 CPython/3.8.2

File hashes

Hashes for pymor-2020.1.1-cp36-cp36m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 7a93562c7cb410406a4a8750c28dc566cc11e176e5b8a4080f4374828cdcd51c
MD5 029bc438745fe24ab9bf9718b751dda0
BLAKE2b-256 1a509db0462683ba4ec1676265590a0f20e643775f019ea2df90789c359fc80c

See more details on using hashes here.

Provenance

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