Giter Site home page Giter Site logo

pymor / pymor Goto Github PK

View Code? Open in Web Editor NEW
276.0 19.0 97.0 40.23 MB

pyMOR - Model Order Reduction with Python

Home Page: https://pymor.org

License: Other

Makefile 0.28% Python 99.22% Shell 0.36% C++ 0.12% CMake 0.02%
python model-reduction model-order-reduction control-systems state-space data-driven parametric nonlinear-dynamics reduced-basis empirical-interpolation

pymor's Introduction

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/[email protected]'

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

pymor's People

Contributors

alexandre-pasco avatar andreasbuhr avatar artpelling avatar bergdola avatar congpy avatar dependabot[bot] avatar dorotheahinsen avatar ftschindler avatar gdmcbain avatar github-actions[bot] avatar henklei avatar jonas-nicodemus avatar josefinez avatar juliabru avatar lbalicki avatar magnusostertag avatar mdessole avatar mechiluca avatar michaellaier avatar michaelschaefer avatar mohamedadelnaguib avatar peoe avatar pmli avatar pre-commit-ci[bot] avatar probot-auto-merge[bot] avatar pymor-bot avatar sdrave avatar steff-mueller avatar uekerman avatar ullmannsven avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pymor's Issues

fix toctrees warnings during documentation generation

There seems to be a clash between numpydoc and autosummary, resulting in over 8000 warnings of the form:

<autosummary>:None: WARNING: toctree contains reference to nonexisting document 'generated/pymor.discreteoperators.basic.GenericLinearOperator.apply'

implement reduced_dune_rb

i.e. in reductors/dune.py or see if reduced_generic_rb() works (I doubt it, becuase of the GenericReconstructor)

'setup.py build' fails when numpy is not installed system-wide

running build_ext
skipping 'src/pymor/tools/relations.c' Cython extension (up-to-date)
building 'pymor.tools.relations' extension
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/include/python2.7 -c src/pymor/tools/relations.c -o build/temp.linux-x86_64-2.7/src/pymor/tools/relations.o
src/pymor/tools/relations.c:256:31: fatal error: numpy/arrayobject.h: No such file or directory
compilation terminated.
error: command 'gcc' failed with exit status 1

importing pymor causes error if cwd not inside pyMor repo

pyMor tries to determine its version using git. If cwd is not inside the pyMor repo, this causes the following error message

In [1]: import pymor
fatal: Not a git repository (or any parent up to mount parent /home)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
Loading pymor version (0, 0, 0, 0, '0')

Possible ways to fix this:

  1. Determine the absolute path of the pyMor installation and launch git inside the correct directory
  2. Show a sensible error message if this fails for some reason.

fixup docstrings for sphinx

Currently there's hundreds of warnings when running sphinx on the codebase:

Parameters

pymor/src/pymor/tools/relations.py:docstring of pymor.tools.relations.inverse_relation:12: > ERROR: Unexpected indentation.
pymor/src/pymor/tools/relations.py:docstring of pymor.tools.relations.inverse_relation:13: WARNING: Block quote ends without a blank line; unexpected unindent.
uni/pymor/src/pymor/tools/relations.py:docstring of pymor.tools.relations.inverse_relation:20: SEVERE: Unexpected section title.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.