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. All algorithms in pyMOR are formulated in terms of abstract interfaces for seamless integration with external PDE solver packages. Moreover, pure Python implementations of finite element and finite volume discretizations using the NumPy/SciPy scientific computing stack are provided for getting started quickly.

Docs DOI Build Status

License

Copyright 2013-2018 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

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]

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

# sparse matrix equation solver for system-theoretic MOR methods
# (other backends available)
open https://www.mpi-magdeburg.mpg.de/projects/mess
# download and install pymess wheel for your architecture

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@0.5.x#egg=pymor[full]

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

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 doc

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.

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 pybindgen can be found in src/pymordemos/minimal_cpp_demo. A more elaborate nonlinear example using Boost.Python can be found here. 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.

  • 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.

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

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 0.5.x

Then, make an editable installation of pyMOR with

pip install -e .

and pull in all optional dependencies by using

pip install -r requirements-optional.txt

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 also create a test coverage report which can be found in the htmlcov directory. Alternatively, you can 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-0.5.2.tar.gz (406.4 kB view details)

Uploaded Source

Built Distributions

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

pymor-0.5.2-cp37-cp37m-manylinux1_x86_64.whl (699.7 kB view details)

Uploaded CPython 3.7m

pymor-0.5.2-cp36-cp36m-manylinux1_x86_64.whl (695.9 kB view details)

Uploaded CPython 3.6m

pymor-0.5.2-cp35-cp35m-manylinux1_x86_64.whl (689.6 kB view details)

Uploaded CPython 3.5m

File details

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

File metadata

  • Download URL: pymor-0.5.2.tar.gz
  • Upload date:
  • Size: 406.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.19.1 setuptools/40.2.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.7

File hashes

Hashes for pymor-0.5.2.tar.gz
Algorithm Hash digest
SHA256 afd21b96682383f40b6707a9a7b5ba2649a8c128300863cbac8dbdef81790271
MD5 4f3dc119f8ff100e34fe690c0d553379
BLAKE2b-256 ba578b7e166ee9352929ee11972e2c312abff7214556399e6a6f995d2698898f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pymor-0.5.2-cp37-cp37m-manylinux1_x86_64.whl
  • Upload date:
  • Size: 699.7 kB
  • Tags: CPython 3.7m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.19.1 setuptools/40.2.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.7

File hashes

Hashes for pymor-0.5.2-cp37-cp37m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 9e486d0af7fb2a8256bfea2a17d3ab813b874db2fe9fc987ec29f9b4e9164fe3
MD5 2e2d1d96c3b334fb1a4ed64bb45bd0a6
BLAKE2b-256 31527a4868242ae24be6dceeef3725f8b9175723b844ec30c2088cc5e27e9a21

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pymor-0.5.2-cp36-cp36m-manylinux1_x86_64.whl
  • Upload date:
  • Size: 695.9 kB
  • Tags: CPython 3.6m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.19.1 setuptools/40.2.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.7

File hashes

Hashes for pymor-0.5.2-cp36-cp36m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 3e5a21f70339d3a4f42e6cf5e3cf8d446e514131f0977c715a33dfb28f1cd754
MD5 a597c2a867848c2718d4dde04f54bb43
BLAKE2b-256 72c342c9092ebb2efbc89e0549daf5f9e865277a6cf8c116266a4c854fddeb53

See more details on using hashes here.

File details

Details for the file pymor-0.5.2-cp35-cp35m-manylinux1_x86_64.whl.

File metadata

  • Download URL: pymor-0.5.2-cp35-cp35m-manylinux1_x86_64.whl
  • Upload date:
  • Size: 689.6 kB
  • Tags: CPython 3.5m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.19.1 setuptools/40.2.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.7

File hashes

Hashes for pymor-0.5.2-cp35-cp35m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 f2fe2c117f9533edc479b61ede8fa799821353034b2848d7459b69fec8d78f68
MD5 5771d49a81b0531f301b77dbcf2e0c99
BLAKE2b-256 c1b48b09cae681ece893def981914e521355b6a44a02b182cdc2ea1db7cc5389

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