Unverified Commit 8adc6748 authored by René Fritze's avatar René Fritze Committed by GitHub
Browse files

Merge pull request #1681 from pymor/2022.1_release_notes

2022.1 Release Notes
parents a1b26036 21883374
Pipeline #150379 passed with stages
in 29 minutes and 41 seconds
......@@ -25,8 +25,8 @@ dependencies:
- mpi4py>=3.0.3
- myst-nb>=0.16
- nbresuse
- numpy>=1.17.5
- numpy>=1.19.4
- numpy>=1.17.5,<1.24
- numpy>=1.19.4,<1.24
- pillow
- pybind11==2.9.2
- pyevtk
......
......@@ -338,28 +338,6 @@ vanilla 3 9:
export PYMOR_HYPOTHESIS_PROFILE="ci"
fi
- ./.ci/gitlab/test_vanilla.bash
numpy_git 3 9:
extends: .pytest
rules:
- if: $CI_PIPELINE_SOURCE == "schedule"
when: never
- when: on_success
variables:
COVERAGE_FILE: coverage_numpy_git__3.9
services:
- name: zivgitlab.wwu.io/pymor/docker/pymor/pypi-mirror_stable_py3.9:${PYPI_MIRROR_TAG}
alias: pypi_mirror
image: zivgitlab.wwu.io/pymor/docker/pymor/testing_py3.9:${CI_IMAGE_TAG}
script:
- |
if [[ "$CI_COMMIT_REF_NAME" == *"github/PR_"* ]]; then
echo selecting hypothesis profile "ci_pr" for branch $CI_COMMIT_REF_NAME
export PYMOR_HYPOTHESIS_PROFILE="ci_pr"
else
echo selecting hypothesis profile "ci" for branch $CI_COMMIT_REF_NAME
export PYMOR_HYPOTHESIS_PROFILE="ci"
fi
- ./.ci/gitlab/test_numpy_git.bash
oldest 3 8:
extends: .pytest
rules:
......@@ -464,7 +442,6 @@ submit coverage:
- mpi 3 9
- vanilla 3 8
- vanilla 3 9
- numpy_git 3 9
- oldest 3 8
submit ci_weekly 3 8:
extends: .submit
......
......@@ -406,7 +406,6 @@ test_scripts = [
("pip_installed", pythons, 1),
("tutorials", pythons, 1),
("vanilla", pythons, 1),
("numpy_git", newest, 1),
("oldest", oldest, 1),
("cpp_demo", pythons, 1),
]
......
......@@ -14,6 +14,9 @@
"ignorePatterns": [
{
"pattern": "^https://opensource.org"
},
{
"pattern": "^https://www.researchgate.net"
}
]
}
......@@ -36,6 +36,7 @@ jobs:
miniconda:
name: Conda ${{ matrix.os }} - Python ${{ matrix.python }}
runs-on: ${{ matrix.os }}
timeout-minutes: 55
strategy:
matrix:
os: [ubuntu-20.04, macos-11, windows-2022]
......@@ -114,12 +115,13 @@ jobs:
run: |
if [[ ${{ runner.os }} == Linux ]]; then
echo "PYTEST_PREFIX=xvfb-run -a" >> $GITHUB_ENV
echo "QT_API=pyside2" >> $GITHUB_ENV
fi
# windows currently segfaults in first QT+MPL plot otherwise
if [[ ${{ runner.os }} == Windows ]]; then
echo "QT_API=pyqt5" >> $GITHUB_ENV
echo "QT_DEBUG_PLUGINS=1" >> $GITHUB_ENV
echo "QT_API=pyside2" >> $GITHUB_ENV
fi
echo "QT_DEBUG_PLUGINS=1" >> $GITHUB_ENV
echo "PYMOR_VERSION=$(python -c 'import pymor;print(pymor.__version__)')" >> $GITHUB_ENV
- name: Sanity check
shell: bash -l {0}
......
......@@ -14,9 +14,10 @@ _PYSIDE = 'PySide2>=5.15.2.1'
def _numpy_scipy():
# numpy versions with filters according to minimal version with a wheel
# 1.24 limit due to https://github.com/pymor/pymor/issues/1692
numpys = [
'numpy>=1.17.5;python_version == "3.8"',
'numpy>=1.19.4;python_version >= "3.9"',
'numpy>=1.17.5,<1.24;python_version == "3.8"',
'numpy>=1.19.4,<1.24;python_version >= "3.9"',
]
scipys = [
'scipy>=1.3;python_version < "3.8"',
......
# Release checklist
1. [ ] Check wheel install on debian stretch produces an OK error message due to too old Python.
1. [ ] Write release notes. All new deprecations need to be mentioned.
1. [ ] Update `README.md`.
1. [ ] (Create release branch.)
......
pyMOR 2022.1 (?? ??, 2022)
--------------------------------
pyMOR 2022.1 (July 19, 2022)
----------------------------
We are proud to announce the release of pyMOR 2022.1!
pyMOR now comes with support for discrete-time systems
and structure-preserving MOR for symplectic systems.
The neural network based reductors gained many new features,
while the VectorArray implementation got simplified.
We have added an experimental FEniCS discretizer
and extended functionality for randomized linear algebra.
Over 700 single commits have entered this release. For a full list of changes
see `here <https://github.com/pymor/pymor/compare/2021.2.x...2022.1.x>`__.
pyMOR 2022.1 contains contributions by Patric Buchfink, Monica Dessole,
Hendrik Kleikamp, Peter Oehme, Art Pelling and Sven Ullmann.
See `here <https://github.com/pymor/pymor/blob/main/AUTHORS.md>`__ for more details.
Release highlights
^^^^^^^^^^^^^^^^^^
Support for discrete-time systems
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
With `[#1500] <https://github.com/pymor/pymor/pull/1500>`_, discrete-time |LTIModels| can now
be instantiated by passing the `sampling_time` to the constructor. The computation of
discrete-time gramians has been enabled in `[#1525] <https://github.com/pymor/pymor/pull/1525>`_
by solving the associated Stein equations with solvers from either SciPy or SLICOT and
`[#1617] <https://github.com/pymor/pymor/pull/1617>`_ also allows for Balanced Truncation of discrete-time systems.
In `[#1614] <https://github.com/pymor/pymor/pull/1614>`_, a class for the construction and evaluation of Moebius
transformations was added. Realizations of LTI systems can be transformed according to arbitrary |MoebiusTransformations|.
The conversion of continuous-time and discrete-time systems with Tustin's method (with optional frequency prewarping)
is implemented on the basis of these |MoebiusTransformations| in dedicated
:func:`to_continuous <pymor.models.iosys.LTIModel.to_continuous>` and
:func:`to_discrete <pymor.models.iosys.LTIModel.to_discrete>` conversion methods.
In preparation for data-driven reduced order modelling methods, a |NumpyHankelOperator| is added in
`[#1546] <https://github.com/pymor/pymor/pull/1546>`_ that avoids explicit matrix constructions by supplying
FFT-accelerated matrix-vector multiplication routines that work on the Markov parameters directly.
Structure-preserving model reduction for symplectic systems
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
With `[#1621] <https://github.com/pymor/pymor/pull/1621>`_
pyMOR now allows to formulate a quadratic Hamiltonian system as full-order model.
Moreover, pyMOR implements multiple structure-preserving basis generation techniques
`[#1600] <https://github.com/pymor/pymor/pull/1600>`_.
In combination with a special reductor for quadratic Hamiltonian systems, a structure-preserving
reduction, known as symplectic MOR, is available
`[#1678] <https://github.com/pymor/pymor/pull/1678>`_. A demo script
for the linear wave equation is included.
Additional new features
^^^^^^^^^^^^^^^^^^^^^^^
Lots of new features for the neural network based reductors
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In `[#1559] <https://github.com/pymor/pymor/pull/1559>`_, a couple of new features
including support for learning rate schedulers, input and output scaling,
regularization of weights and biases, a weighted MSE loss and logging of current
losses have been added to improve the training of neural networks. These additions
make the training process more flexible and all components can be combined as required.
If no full-order model is available but only snapshot data, it is now also possible to
use the neural network based reductors in a data-driven way.
In `[#1679] <https://github.com/pymor/pymor/pull/1679>`_, the reductors have been
adjusted to allow for pairs of parameters and corresponding snapshot data as training
set instead of only parameters. The resulting surrogate models can be used as before.
Randomized linear algebra algorithms
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
pyMOR's numerical linear algebra algorithms have been extended by randomized methods:
the new :mod:`~pymor.algorithms.rand_la` module includes a method for
:func:`singular value decomposition <pymor.algorithms.rand_la.random_generalized_svd>`
of arbitrary linear pyMOR |Operators|, as well as an algorithm for solving
:func:`generalized hermitian eigenproblems <pymor.algorithms.rand_la.random_ghep>`.
The old randomized range approximation algorithms from the
`pymor.algorithms.randrangefinder` module have been moved to the new module as well
`[#1552] <https://github.com/pymor/pymor/pull/1552>`_.
FEniCS discretizer
~~~~~~~~~~~~~~~~~~
pyMOR's symbolic :class:`Expressions <pymor.analyticalproblems.expressions.Expression>`
can now be converted to equivalent `UFL <https://fenics.readthedocs.io/projects/ufl/en/latest/>`_
expressions. In particular, |ExpressionFunction| now has a `to_fenics` methods which
utilizes this functionality under the hood `[#1550] <https://github.com/pymor/pymor/pull/1550>`_.
Based on this feature an experimental :mod:`discretizer <pymor.discretizers.fenics>`
converts pyMOR |analytical problems| to FEniCS-based |Models|
`[#1682] <https://github.com/pymor/pymor/pull/1682>`_.
Simplified VectorArray implementation
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The |VectorArray| code in pyMOR has been refactored into a single user-facing interface
class and backend-specific
:class:`implementation classes <pymor.vectorarrays.interface.VectorArrayImpl>`.
All error checking, as well as managing of copy-on-write semantics and views is
handled by the interface class, which should significantly simplify the correct
implementation of new |VectorArrays| `[#1584] <https://github.com/pymor/pymor/pull/1584>`_.
Backward incompatible changes
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Dropped Python 3.7 support
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Following numpy/scipy we have dropped official support for
~~~~~~~~~~~~~~~~~~~~~~~~~~
Following NumPy/SciPy we have dropped official support for
Python 3.7. This means pyMOR now requires Python 3.8 to install
and is no longer tested against for 3.7.
and is no longer tested against 3.7.
Further notable improvements
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- `[#1513] FEniCS: Save LinearSolver object in FenicsMatrixOperator to accelerate repeated solves <https://github.com/pymor/pymor/pull/1513>`_
- `[#1520] Change RQI stopping criterion <https://github.com/pymor/pymor/pull/1520>`_
- `[#1531] Remove 'if config.HAVE_...' checks in modules that require optional dependencies <https://github.com/pymor/pymor/pull/1531>`_
- `[#1539] Add algorithm to contract non-parametric parts of LincombOperators and ConcatenationOperators <https://github.com/pymor/pymor/pull/1539>`_
- `[#1576] Traverse ast to parse literals in Expressions <https://github.com/pymor/pymor/pull/1576>`_
- `[#1583] preset values for LTIModel <https://github.com/pymor/pymor/pull/1583>`_
- `[#1611] PHLTI system <https://github.com/pymor/pymor/pull/1611>`_
- `[#1616] Improve LTIModel.from_mat_file <https://github.com/pymor/pymor/pull/1616>`_
- `[#1637] Avoid division by zero in gram_schmidt <https://github.com/pymor/pymor/pull/1637>`_
- `[#1659] Provide a default implementation of ComplexifiedVector.amax via to_numpy <https://github.com/pymor/pymor/pull/1659>`_
- `[#1662] Provide a default implementation of apply_inverse by converting to a NumPy/SciPy matrix <https://github.com/pymor/pymor/pull/1662>`_
- `[#1673] Use Navier-Stokes example in Neural Network demo <https://github.com/pymor/pymor/pull/1673>`_
......@@ -86,6 +86,8 @@ common = '''
.. |ListVectorArray| replace:: :class:`~pymor.vectorarrays.list.ListVectorArray`
.. |ListVectorArrays| replace:: :class:`ListVectorArrays <pymor.vectorarrays.list.ListVectorArray>`
.. |NumpyHankelOperator| replace:: :class:`~pymor.operators.numpy.NumpyHankelOperator`
.. |NumpyHankelOperators| replace:: :class:`NumpyHankelOperators <pymor.operators.numpy.NumpyHankelOperator>`
.. |NumpyMatrixOperator| replace:: :class:`~pymor.operators.numpy.NumpyMatrixOperator`
.. |NumpyMatrixOperators| replace:: :class:`NumpyMatrixOperators <pymor.operators.numpy.NumpyMatrixOperator>`
.. |NumpyMatrixBasedOperator| replace:: :class:`~pymor.operators.numpy.NumpyMatrixBasedOperator`
......
......@@ -20,8 +20,8 @@ mpi4py>=3.0.3;python_version >= "3.9"
mpi4py>=3.0;python_version < "3.9"
myst-nb>=0.16
nbresuse
numpy>=1.17.5;python_version == "3.8"
numpy>=1.19.4;python_version >= "3.9"
numpy>=1.17.5,<1.24;python_version == "3.8"
numpy>=1.19.4,<1.24;python_version >= "3.9"
packaging
pillow
pyevtk
......
# This file is autogenerated. Edit dependencies.py instead
click
diskcache
numpy>=1.17.5;python_version == "3.8"
numpy>=1.19.4;python_version >= "3.9"
numpy>=1.17.5,<1.24;python_version == "3.8"
numpy>=1.19.4,<1.24;python_version >= "3.9"
packaging
pytest-runner>=2.9
qtpy!=2.0.0
......
......@@ -16,8 +16,16 @@ def text_problem(text='pyMOR', font_name=None):
import numpy as np
from PIL import Image, ImageDraw
def _getsize(font_object, string):
try:
# pillow >= 9.2.0
left, top, right, bottom = font_object.getbbox(string)
return (right-left, bottom-top)
except AttributeError:
return font_object.getsize(string)
font = _get_font(font_name)
size = font.getsize(text) # compute width and height of rendered text
size = _getsize(font, text) # compute width and height of rendered text
size = (size[0] + 20, size[1] + 20) # add a border of 10 pixels around the text
def make_bitmap_function(char_num):
......@@ -31,7 +39,7 @@ def text_problem(text='pyMOR', font_name=None):
# next we erase all previous character by drawing a black rectangle
if char_num > 0:
d.rectangle(((0, 0), (font.getsize(text[:char_num])[0] + 10, size[1])), fill=0, outline=0)
d.rectangle(((0, 0), (_getsize(font, text[:char_num])[0] + 10, size[1])), fill=0, outline=0)
# open a new temporary file
# after leaving this 'with' block, the temporary file is automatically deleted
......
......@@ -312,7 +312,7 @@ class ColorBarWidget(QOpenGLWidget):
gl.glVertex(0.5, (bar_height*y + bar_start), y)
gl.glEnd()
p.endNativePainting()
p.drawText(int(round((self.width() - self.vmax_width)/2)), self.text_ascent, self.vmax_str)
p.drawText(int(round((self.width() - self.vmin_width)/2)), self.height() - self.text_height + self.text_ascent,
self.vmin_str)
p.drawText(int(round((self.width() - self.vmax_width)/2)), int(round(self.text_ascent)), self.vmax_str)
p.drawText(int(round((self.width() - self.vmin_width)/2)),
int(round(self.height() - self.text_height + self.text_ascent)), self.vmin_str)
p.end()
......@@ -11,7 +11,7 @@ This module provides the following |NumPy|-based |Operators|:
which assemble into a |NumpyMatrixOperator|.
- |NumpyGenericOperator| wraps an arbitrary Python function between
|NumPy arrays| as an |Operator|.
- :class:`NumpyHankelOperator` implicitly constructs a Hankel operator from a |NumPy array| of
- |NumpyHankelOperator| implicitly constructs a Hankel operator from a |NumPy array| of
Markov parameters.
"""
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment