Data-Driven Model Order Reduction with pyMOR (companion code)
This repository contains the companion code to the publication
Data-Driven Model Order Reduction with pyMOR (2026)
by
Reproducing results from the paper
Generating the figures and tables
Compiling the LaTeX files in figures/ will take the current output/ data into account and generate PDF files.
This repository already contains the reference PDFs generated for the publication.
Re-compiling the LaTeX files will re-generate similar PDFs.
After getting started (and optionally running the code), run
source 01_activate_env.bash
bash 03_generate_figures_from_output.bash
to re-generate new figures/ PDFs.
Running the code
Running the Python scripts in code/ will generate the output/ data.
This repository already contains the reference data generated for the publication.
Re-running the script will re-generate similar data, though timings and speedup may differ.
After getting started, run
source 01_activate_env.bash
bash 02_generate_output_from_code.bash
to re-generate new output/ data.
Note, that we're running all experiments sequentially with MKL compatibility flags for numerical reproducability (see the 02_generate_output_from_code.bash script).
Running them required around 52GB of memory and 150h of time on our target hardware (see for instance figures/NOTES.md)!
See the section on quick tests on how to run coarse experiments with lower requirements.
Getting started
We support two setups:
Both require this repository to be checked out:
git clone https://github.com/pymor/2026_paper_code.git
Native Execution
This requires an x86_64 system with a Bash shell and curl (or wget).
Initial Setup
With bash and curl present, execute:
cd 2026_paper_code
bash 00_setup.bash
This downloads Miniforge, installs it locally, creates the conda environment from the
lockfile, and verifies all imports. While this is enough to run the code,
you will also need latexmk, texlive-fonts-recommended, texlive-latex-extra,
texlive-luatex, texlive-pictures to generate the figures and tables
(these are package names to sudo apt-get install -y --no-install-recommends on Debian-based systems,
see also our Dockerfile).
Quick Sanity Checks
We ship tests which execute the code on a simplified setup and compare the output against expected results.
See tests/README.md for more information.
Execute
cd 2026_paper_code
pytest -v
Subsequent Sessions
Each time you open a new shell:
cd 2026_paper_code
source 01_activate_env.bash
Dockerised Execution
This requires an x86_64 system with rootless Docker or rootless Podman installed and configured.
See docker/README.md for more information.
Initial Setup
With rootless docker or podman, execute
cd 2026_paper_code
docker compose -f docker/docker-compose.yml build
to build the image locally, or
cd 2026_paper_code
docker compose -f docker/docker-compose.yml pull
to instead pull the latest image.
Quick Sanity Checks
We ship tests which execute the code on a simplified setup and compare the output against expected results.
See tests/README.md for more information.
Execute
cd 2026_paper_code
docker compose -f docker/docker-compose.yml run --rm dev pytest -v
Subsequent Sessions
Prepend all COMMANDs with:
docker compose -f docker/docker-compose.yml run --rm dev COMMAND
This will mount the projects directory inside the container, source the env and run COMMAND.
Sourcing the 01_activate_env.bash is thus not required in this execution mode.
Quick tests
We support running coarse experiments with QUICKTEST=1 to roughly reproduce the behaviour of the code/ with lower compute requirements.
Note: this required around 11GB of memory and 5.5h of time on a consumer Notebook with a 12th Gen Intel(R) Core(TM) i7-12800H CPU.
In native mode:
source 01_activate_env.bash
QUICKTEST=1 bash 02_generate_output_from_code.bash
QUICKTEST=1 bash 03_generate_figures_from_output.bash
In dockerised mode:
QUICKTEST=1 docker compose -f docker/docker-compose.yml run --rm dev bash 02_generate_output_from_code.bash
QUICKTEST=1 docker compose -f docker/docker-compose.yml run --rm dev bash 03_generate_figures_from_output.bash
This should leave you with output/ and figures/ that display a similar behaviour to the published ones.
Note that running the quick tests will change the existing output/ and figures/ and add new files
(filenames depend on experiment setup).
To discard these changes and revert back to the reference state, use:
git restore output figures
git clean -xdf output figures
License
Different parts of this repository are released under different licenses,
appropriate to the type of content:
Everything else — the repository infrastructure such as the top-level Bash
scripts (*.bash), the Docker setup (docker/), the GitHub Actions
workflows (.github/), the test suite (tests/) and the
configuration/lock files — is also released under BSD-2-Clause, the same
license as the code; see the top-level LICENSE.
The code/ license matches that of pyMOR,
on which this code builds. Some files under figures/ are third-party logos or
publisher-provided typesetting resources that are not covered by CC-BY-4.0;
see figures/LICENSE for details.