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

Merge pull request #1932 from pymor/from_pr_1625

From pr 1625
parents 8f8f05df dea72514
Pipeline #187597 passed with stages
in 41 minutes and 41 seconds
......@@ -140,7 +140,7 @@ stages:
- devpi upload --from-dir --formats=* ./dist/*.whl
- python3 -m pip install pip~=22.0
- python3 -m pip uninstall -y pymor || true
# the docker service adressing fails on other runners
# the docker service addressing fails on other runners
tags: [mike]
.sanity_checks:
......
......@@ -151,7 +151,7 @@ rules:
- devpi upload --from-dir --formats=* ./dist/*.whl
- python3 -m pip install pip~=22.0
- python3 -m pip uninstall -y pymor || true
# the docker service adressing fails on other runners
# the docker service addressing fails on other runners
tags: [mike]
.sanity_checks:
......
infrastructure:
- .ci/*
- .github/*
- .binder/*
- .ci/**/*
- .github/**/*
- .binder/**/*
- Makefile
- requirements*
- pyproject.toml
......
---
###########################
###########################
## Markdown Linter rules ##
###########################
###########################
# Linter rules doc:
# - https://github.com/DavidAnson/markdownlint
###############
# Rules by id #
###############
MD013:
line_length: 120 # Line length 80 is far to short
MD041: false # require heading as first line in file
MD040: false # ``` fenced code must have language set
#################
# Rules by tags #
#################
blank_lines: false # Error on blank lines
......@@ -20,3 +20,7 @@ repos:
- id: ruff
# Respect `exclude` and `extend-exclude` settings.
args: ["--force-exclude", "--fix"]
- repo: https://github.com/DavidAnson/markdownlint-cli2
rev: v0.4.0
hooks:
- id: markdownlint-cli2
......@@ -153,7 +153,7 @@
* BlockOperator and BlockDiagonalOperator
* Michael Schaefer, michael.schaefer@uni-muenster.de
* Robin bondary condition support for pymor.operators.cg
* Robin boundary condition support for pymor.operators.cg
### pyMOR 0.3
......
......@@ -124,7 +124,7 @@ pyMOR's main developers form a small
of developers which, apart from making contributions to pyMOR,
have the job of guiding and maintaining the future development of
pyMOR. They are the only persons with direct push acces to pyMOR's
main repository and have administrative priviliges over the
main repository and have administrative privileges over the
[pyMOR organization](https://github.com/pymor) on GitHub.
As pyMOR is an open project, everyone is invited to step up to
......@@ -136,7 +136,7 @@ in discussions on the mailing list and through GitHub. The applicant
should be able to commit to the project for a time period of at
least one year.
Main developers will be automatically retired (losing all priviliges)
Main developers will be automatically retired (losing all privileges)
if they have not shown any relevant activity over a period of one
year. Under special circumstances, the main developers
(excluding the developer in question) may decide by simple majority
......
......@@ -115,7 +115,8 @@ which will require that the [git](https://git-scm.com/) version control system i
installed on your system.
From time to time, the main branch of pyMOR undergoes major changes and things
might break (this is usually announced in our [discussion forum](https://github.com/pymor/pymor/discussions)),
might break (this is usually announced in our
[discussion forum](https://github.com/pymor/pymor/discussions)),
so you might prefer to install pyMOR from the current release branch:
pip install git+https://github.com/pymor/pymor@2022.2.x#egg=pymor[full]
......@@ -202,7 +203,8 @@ separately. Bindings for the following solver libraries are included:
* [Slycot](https://github.com/python-control/Slycot)
Python wrapper for the Subroutine Library in Systems and Control Theory (SLICOT) is also used for Hardy norm computations (`pymor.bindings.slycot`).
Python wrapper for the Subroutine Library in Systems and Control Theory (SLICOT) is also
used for Hardy norm computations (`pymor.bindings.slycot`).
Environments for pyMOR Development and Tests
-----------------------------------------------
......
......@@ -99,7 +99,7 @@ parameter values which maximises reduction error.
## The thermalblock demo explained
In the following we will walk through the thermal block demo step by
In the following we will go through the thermal block demo step by
step in an interactive Python shell. We assume that you are familiar
with the reduced basis method and that you know the basics of
[Python](<https://www.python.org>) programming as well as working
......@@ -130,7 +130,8 @@ by executing:
from pymor.basic import *
from pymor.core.logger import set_log_levels
set_log_levels({'pymor.algorithms.greedy': 'ERROR', 'pymor.algorithms.gram_schmidt.gram_schmidt': 'ERROR', 'pymor.algorithms.image.estimate_image_hierarchical': 'ERROR'})
set_log_levels({'pymor.algorithms.greedy': 'ERROR', 'pymor.algorithms.gram_schmidt.gram_schmidt':
'ERROR', 'pymor.algorithms.image.estimate_image_hierarchical': 'ERROR'})
```
Next we will instantiate a class describing the analytical problem
......
......@@ -38,7 +38,7 @@ New system analysis and linear algebra algorithms
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The new :meth:`~pymor.algorithms.eigs.eigs` method
`[#880] <https://github.com/pymor/pymor/pull/880>`_ computes
smallest/largest eigenvalues of an arbitary linear real |Operator|
smallest/largest eigenvalues of an arbitrary linear real |Operator|
using the implicitly restarted Arnoldi method :cite:`RL95`. It can also
be used to solve generalized eigenvalue problems.
......@@ -214,7 +214,7 @@ Further notable improvements
- `[#888] Implement FenicsVectorSpace.from_numpy <https://github.com/pymor/pymor/pull/888>`_
- `[#895] Implement VectorArray.__deepcopy__ via VectorArray.copy(deep=True) <https://github.com/pymor/pymor/pull/895>`_
- `[#905] Add from_files method to SecondOrderModel <https://github.com/pymor/pymor/pull/905>`_
- `[#919] [reductors.coercive] remove unneccessary initialization in SimpleCoerciveReductor <https://github.com/pymor/pymor/pull/919>`_
- `[#919] [reductors.coercive] remove unnecessary initialization in SimpleCoerciveReductor <https://github.com/pymor/pymor/pull/919>`_
- `[#926] [Operators] Speed up apply methods for LincombOperator <https://github.com/pymor/pymor/pull/926>`_
- `[#937] Move NumpyListVectorArrayMatrixOperator out of the playground <https://github.com/pymor/pymor/pull/937>`_
- `[#943] [logger] adds a ctx manager that restores effective level on exit <https://github.com/pymor/pymor/pull/943>`_
......@@ -106,7 +106,7 @@ from pymor.basic import *
```
Then we build a 3-by-3 thermalblock problem that we discretize using pyMOR's
{mod}`builtin discretizers <pymor.discretizers.builtin>` (see
{mod}`built-in discretizers <pymor.discretizers.builtin>` (see
{doc}`tutorial_builtin_discretizer` for an introduction to pyMOR's discretization toolkit).
```{code-cell}
......@@ -187,7 +187,7 @@ fom.solution_space
which means that the created {{ VectorArrays }} will internally hold
{{ NumPy_arrays }} for data storage. The number is the dimension of the
vector. We have here a {{ NumpyVectorSpace }} because pyMOR's builtin
vector. We have here a {{ NumpyVectorSpace }} because pyMOR's built-in
discretizations are built around the NumPy/SciPy stack. If `fom` would
represent a {{ Model }} living in an external PDE solver, we would have
a different type of {{ VectorSpace }} which, for instance, might hold a
......@@ -279,8 +279,8 @@ V = fom.solve(parameter_space.sample_randomly())
The matrix {math}`G` of all inner products between vectors in `trivial_basis`
is a so called [Gramian matrix](<https://en.wikipedia.org/wiki/Gramian_matrix>).
Consequently, every {{ VectorArray }} has a {meth}`~pymor.vectorarrays.interface.VectorArray.gramian` method, which computes precisely
this matrix:
Consequently, every {{ VectorArray }} has a {meth}`~pymor.vectorarrays.interface.VectorArray.gramian`
method, which computes precisely this matrix:
```{code-cell}
G = trivial_basis.gramian()
......
......@@ -143,10 +143,10 @@ with a few more advanced techniques added.
```
Again we define a `py:class\_` with appropiate name and docstring, but now we also indicate to pybind11
Again we define a `py:class\_` with appropriate name and docstring, but now we also indicate to pybind11
that this class will implement the [buffer protocol](<https://docs.python.org/3/c-api/buffer.html>), which basically
exposes direct access to the chunk of memory associated with a `Vector` instance to Python. We also see how we can dispatch multiple init functions
by using `py:init` objects with C++ lambda functions.
exposes direct access to the chunk of memory associated with a `Vector` instance to Python.
We also see how we can dispatch multiple init functions by using `py:init` objects with C++ lambda functions.
Note that direct memory access to the vector data from Python is not required to integrate a solver with pyMOR.
It is, however, useful for debugging and quickly modifying or extending the solver from within Python. For instance,
in our toy example we will use the direct memory access to quickly define a visualization of the solutions and to
......@@ -217,12 +217,13 @@ dir(model)
## Using the exported Python classes with pyMOR
All of pyMOR's algorithms operate on {{ VectorArray }} and {{ Operator }} objects that all share the same programming interface. To be able to use
All of pyMOR's algorithms operate on {{ VectorArray }} and {{ Operator }} objects that all
share the same programming interface. To be able to use
our Python `model.Vector` and `model.DiffusionOperator` in pyMOR, we have to provide implementations of
{{ VectorArray }}, {{ VectorSpace }} and {{ Operator }} that wrap the classes defined in the extension module
and translate calls to the interface methods into operations on `model.Vector` and `model.DiffusionOperator`.
Instead of writing a full implementaion of a {{ VectorArray }} that manages multiple `model.Vector`
Instead of writing a full implementation of a {{ VectorArray }} that manages multiple `model.Vector`
instances, we can instead implement a wrapper `WrappedVector` for a single `model.Vector` instance based on
{class}`~pymor.vectorarrays.list.CopyOnWriteVector` which will be used to create
{{ ListVectorArrays }} via a {class}`~pymor.vectorarrays.list.ListVectorSpace`-based `WrappedVectorSpace`.
......
......@@ -107,7 +107,7 @@ Dirichlet boundary conditions
u((x_1, x_2), \mu) = 2x_1\mu + 0.5,\quad x=(x_1, x_2) \in \partial\Omega.
```
We discretize the problem using pyMOR's builtin discretization toolkit as
We discretize the problem using pyMOR's built-in discretization toolkit as
explained in {doc}`tutorial_builtin_discretizer`:
```{code-cell}
......@@ -395,6 +395,7 @@ np.median(outputs_speedups)
## Neural networks for instationary problems
To solve instationary problems using neural networks, we have extended the
{class}`~pymor.reductors.neural_network.NeuralNetworkReductor` to the
{class}`~pymor.reductors.neural_network.NeuralNetworkInstationaryReductor`, which treats time
......
......@@ -281,7 +281,7 @@ def prepare_data(offline_time=False, enrichments=False):
def record_results(function, data, adaptive_enrichment=False, opt_dict=None, mu=None):
if adaptive_enrichment:
# this is for the adaptive case! rom is shiped via the opt_dict argument.
# this is for the adaptive case! rom is shipped via the opt_dict argument.
assert opt_dict is not None
QoI, data, rom = function(mu, data, opt_dict)
opt_dict['opt_rom'] = rom
......
pyMOR Logo Usage Guidelines
===========================
If you wish to reference pyMOR on your webpage, publication or presentation slides, you are welcome to use our logo. Here you can find different versions of the logo that you may use. Please use the logo as is and make no modifications. In particular:
If you wish to reference pyMOR on your webpage, publication or presentation slides,
you are welcome to use our logo. Here you can find different versions of the logo
that you may use. Please use the logo as is and make no modifications. In particular:
- Do not change the colors of the logo.
- Do not add a background color.
......@@ -10,8 +12,9 @@ If you wish to reference pyMOR on your webpage, publication or presentation slid
If you want to create a derived version of the logo for your own project, please ask us first.
type | PNG | SVG
------|------|---------
<!-- markdownlint-disable MD033 -->
type | PNG | SVG
------|-----------------------------------------------------|----------------------------------------------------
color | <img src="pymor_logo.png" width=320> | <img src="pymor_logo.svg" width=320>
black | <img src="pymor_logo_black.png" width=320> | <img src="pymor_logo_black.svg" width=320>
white | <img src="pymor_logo_white_black_bg.png" width=320> | <img src="pymor_logo_white_black_bg.png" width=320>
......@@ -95,7 +95,7 @@ def parse_expression(expression, parameters={}, values={}):
raise ValueError(f"""
While parsing expression
\t{expression}
with parameters {parameters} and values {values} the following error occured:
with parameters {parameters} and values {values} the following error occurred:
\t{e}
""") from e
......
......@@ -110,7 +110,7 @@ class QuadraticHamiltonianModel(BaseQuadraticHamiltonianModel):
H_op
The |Operator| H_op.
h
The state-independet part of the Hamiltonian h.
The state-independent part of the Hamiltonian h.
time_stepper
The :class:`time-stepper <pymor.algorithms.timestepping.TimeStepper>`
to be used by :meth:`~pymor.models.interface.Model.solve`.
......
......@@ -1025,7 +1025,7 @@ def train_neural_network(training_data, validation_data, neural_network,
(a dictionary of additional parameters for the learning rate
scheduler), `'es_scheduler_params'` (a dictionary of additional
parameters for the early stopping scheduler), and `'weight_decay'`
(non-negative real number that determines the strenght of the
(non-negative real number that determines the strength of the
l2-regularization; if not provided or 0., no regularization is applied).
scaling_parameters
Dict of tensors that determine how to scale inputs before passing them
......
......@@ -7,7 +7,7 @@ from enum import Enum
def Choices(choices):
"""Multipe-choice options for typer.
"""Multiple-choice options for typer.
This is a convenicence function that creates string Enums to be
used as the type of command-line arguments that can take a fixed set
......
......@@ -22,7 +22,7 @@ def main(
exp: float = Argument(..., help='Exponent'),
atol: float = Option(None, help='Absolute tolerance'),
continuous_time: bool = Option(False, help='Show continous time system eigenvalues.'),
continuous_time: bool = Option(False, help='Show continuous time system eigenvalues.'),
grid: int = Option(100, help='Use grid with this number of elements.'),
initial_data: Choices('sin bump') = Option('sin', help='Select the initial data.'),
modes: int = Option(None, help='Number of DMD modes'),
......
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