Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ TODO: Summarize and motivate the changes, link to issues, remove the checklist e
## Checklist

- [ ] I added a summary of any user-facing changes (compared to the last release) in the `changelog-entries/<PRnumber>.md`.
- [ ] If I changed `requirements.txt` files, I regenerated sibling `requirements-reference.txt` files with `python3 tools/releasing/update-requirements-reference.py` (pass a path to update only that directory, or `--all` to refresh everything).

For new tutorials or tutorial cases:

Expand Down
29 changes: 29 additions & 0 deletions .github/workflows/check-requirements-reference.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Check requirements-reference
on:
pull_request:
branches:
- master
- develop
paths:
- '**/requirements.txt'
- '**/requirements-reference.txt'
- tools/releasing/update-requirements-reference.py
- tools/releasing/requirements.txt
jobs:
check:
runs-on: ubuntu-latest
steps:
- name: Checkout the repository
uses: actions/checkout@v7
- name: Setup python
uses: actions/setup-python@v6
with:
python-version: '3.10'
- name: Install packaging
run: pip install -r tools/releasing/requirements.txt
- name: Check requirements-reference.txt files exist
if: github.base_ref == 'develop'
run: python3 tools/releasing/update-requirements-reference.py --check
- name: Check requirements-reference.txt files are up to date
if: github.base_ref == 'master'
run: python3 tools/releasing/update-requirements-reference.py --check --fail-on-outdated
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,5 @@ As a general rule, you can start each participant from inside their `<tutorial>/
Contributions to this repository are very welcome. Please refer to the page [Contribute to preCICE](https://precice.org/community-contribute-to-precice.html) for a few guidelines and hints to help you in this direction.

Note that we use [Git LFS](https://git-lfs.com/) to version reference results. These will appear as seemingly empty files containing URLs if you don't have Git LFS installed (optional, mainly useful for our system tests).

For Python dependency ranges and the sibling `requirements-reference.txt` files used for reproducible installs, see [`tools/releasing/README.md`](tools/releasing/README.md).
1 change: 1 addition & 0 deletions changelog-entries/610.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- Add loose version constraints to tutorial `requirements.txt` files and sibling `requirements-reference.txt` pins generated from PyPI via `tools/releasing/update-requirements-reference.py`, with a CI check that requires reference files on `develop` and up-to-date pins on release PRs to `master` ([#871](https://github.com/precice/tutorials/pull/871)).
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Pinned Python dependency versions for this tutorial participant.
# Reference only: run scripts keep using loose requirements.txt constraints.
# Generated by tools/releasing/update-requirements-reference.py — do not edit manually.
# Source: channel-transport-particles/fluid-nutils/requirements.txt
# Generated: 2026-07-13T16:48:40Z

setuptools==83.0.0
nutils==7.3
numpy==1.26.4
pyprecice==3.4.0
3 changes: 1 addition & 2 deletions channel-transport-particles/fluid-nutils/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
setuptools # required by nutils
setuptools>=69.0.0 # required by nutils
Comment thread
MakisH marked this conversation as resolved.
nutils~=7.3
numpy >1, <2
pyprecice~=3.0
setuptools
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Pinned Python dependency versions for this tutorial participant.
# Reference only: run scripts keep using loose requirements.txt constraints.
# Generated by tools/releasing/update-requirements-reference.py — do not edit manually.
# Source: channel-transport-reaction/chemical-fenics/requirements.txt
# Generated: 2026-07-13T16:48:40Z

numpy==1.26.4
fenicsprecice==2.3.0
fenics-dijitso==2019.1.0
# fenics-dolfin~=2019.0 # non-PyPI (system/PPA or no matching PyPI version)
fenics-ffc==2019.1.0.post0
fenics-fiat==2019.1.0
fenics-ufl-legacy==2022.3.0
13 changes: 13 additions & 0 deletions channel-transport-reaction/fluid-fenics/requirements-reference.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Pinned Python dependency versions for this tutorial participant.
# Reference only: run scripts keep using loose requirements.txt constraints.
# Generated by tools/releasing/update-requirements-reference.py — do not edit manually.
# Source: channel-transport-reaction/fluid-fenics/requirements.txt
# Generated: 2026-07-13T16:48:40Z

numpy==1.26.4
fenicsprecice==2.3.0
fenics-dijitso==2019.1.0
# fenics-dolfin~=2019.0 # non-PyPI (system/PPA or no matching PyPI version)
fenics-ffc==2019.1.0.post0
fenics-fiat==2019.1.0
fenics-ufl-legacy==2022.3.0
10 changes: 10 additions & 0 deletions channel-transport/fluid-nutils/requirements-reference.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Pinned Python dependency versions for this tutorial participant.
# Reference only: run scripts keep using loose requirements.txt constraints.
# Generated by tools/releasing/update-requirements-reference.py — do not edit manually.
# Source: channel-transport/fluid-nutils/requirements.txt
# Generated: 2026-07-13T16:48:40Z

setuptools==83.0.0
nutils==7.3
numpy==1.26.4
pyprecice==3.4.0
3 changes: 1 addition & 2 deletions channel-transport/fluid-nutils/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
setuptools # required by nutils
setuptools>=69.0.0 # required by nutils
nutils~=7.3
numpy >1, <2
pyprecice~=3.0
setuptools
10 changes: 10 additions & 0 deletions channel-transport/transport-nutils/requirements-reference.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Pinned Python dependency versions for this tutorial participant.
# Reference only: run scripts keep using loose requirements.txt constraints.
# Generated by tools/releasing/update-requirements-reference.py — do not edit manually.
# Source: channel-transport/transport-nutils/requirements.txt
# Generated: 2026-07-13T16:48:40Z

setuptools==83.0.0
nutils==7.3
numpy==1.26.4
pyprecice==3.4.0
3 changes: 1 addition & 2 deletions channel-transport/transport-nutils/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
setuptools # required by nutils
setuptools>=69.0.0 # required by nutils
nutils~=7.3
numpy >1, <2
pyprecice >=3.2 # Remeshing support is available since preCICE version 3.2
setuptools
9 changes: 9 additions & 0 deletions elastic-tube-1d/fluid-python/requirements-reference.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Pinned Python dependency versions for this tutorial participant.
# Reference only: run scripts keep using loose requirements.txt constraints.
# Generated by tools/releasing/update-requirements-reference.py — do not edit manually.
# Source: elastic-tube-1d/fluid-python/requirements.txt
# Generated: 2026-07-13T16:48:40Z

matplotlib==3.11.0
numpy==1.26.4
pyprecice==3.4.0
2 changes: 1 addition & 1 deletion elastic-tube-1d/fluid-python/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
matplotlib
matplotlib>=3,<4
numpy >1, <2
pyprecice~=3.0
8 changes: 8 additions & 0 deletions elastic-tube-1d/solid-python/requirements-reference.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Pinned Python dependency versions for this tutorial participant.
# Reference only: run scripts keep using loose requirements.txt constraints.
# Generated by tools/releasing/update-requirements-reference.py — do not edit manually.
# Source: elastic-tube-1d/solid-python/requirements.txt
# Generated: 2026-07-13T16:48:40Z

numpy==1.26.4
pyprecice==3.4.0
13 changes: 13 additions & 0 deletions elastic-tube-3d/solid-fenics/requirements-reference.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Pinned Python dependency versions for this tutorial participant.
# Reference only: run scripts keep using loose requirements.txt constraints.
# Generated by tools/releasing/update-requirements-reference.py — do not edit manually.
# Source: elastic-tube-3d/solid-fenics/requirements.txt
# Generated: 2026-07-13T16:48:40Z

fenicsprecice==2.3.0
numpy==1.26.4
fenics-dijitso==2019.1.0
# fenics-dolfin~=2019.0 # non-PyPI (system/PPA or no matching PyPI version)
fenics-ffc==2019.1.0.post0
fenics-fiat==2019.1.0
fenics-ufl-legacy==2022.3.0
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Pinned Python dependency versions for this tutorial participant.
# Reference only: run scripts keep using loose requirements.txt constraints.
# Generated by tools/releasing/update-requirements-reference.py — do not edit manually.
# Source: flow-around-controlled-moving-cylinder/controller-fmi/requirements.txt
# Generated: 2026-07-13T16:48:40Z

pyprecice==3.4.0
fmiprecice==0.2.1
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
pyprecice~=3.0
fmiprecice
fmiprecice~=0.2
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Pinned Python dependency versions for this tutorial participant.
# Reference only: run scripts keep using loose requirements.txt constraints.
# Generated by tools/releasing/update-requirements-reference.py — do not edit manually.
# Source: flow-around-controlled-moving-cylinder/solid-python/requirements.txt
# Generated: 2026-07-13T16:48:40Z

pyprecice==3.4.0
numpy==1.26.4
2 changes: 1 addition & 1 deletion flow-over-heated-plate/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ First generate the output for each run by adding export to the participant `Soli
</participant>
```

After that running a case from this tutorial will export data into `solid-*/precice-exports`. To visualize and compare these results run `python3 plot-final-interface-temperature.py` (You can install the required python packages by running `pip3 install -r plot-final-interface-temperature-requirements.txt`). This will plot the dimensionless temperature `theta = (T-300)/(310-300)` (with `T` being the temperature) across the coupling interface, i.e. where the solid and the fluid meet and exchange heat. The x-axis shows the x coordinate and the y-axis the dimensionless temperature `theta` at the interface. If you want to exclude certain cases, simply comment out the corresponding lines in the script. For reference see below:
After that running a case from this tutorial will export data into `solid-*/precice-exports`. To visualize and compare these results run `python3 plot-final-interface-temperature/plot-final-interface-temperature.py` (You can install the required python packages by running `pip3 install -r plot-final-interface-temperature/requirements.txt`). This will plot the dimensionless temperature `theta = (T-300)/(310-300)` (with `T` being the temperature) across the coupling interface, i.e. where the solid and the fluid meet and exchange heat. The x-axis shows the x coordinate and the y-axis the dimensionless temperature `theta` at the interface. If you want to exclude certain cases, simply comment out the corresponding lines in the script. For reference see below:

![Comparison of the results with different solvers](images/tutorials-flow-over-heated-plate-results-comparison.png)

Expand Down
8 changes: 8 additions & 0 deletions flow-over-heated-plate/fluid-su2/requirements-reference.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Pinned Python dependency versions for this tutorial participant.
# Reference only: run scripts keep using loose requirements.txt constraints.
# Generated by tools/releasing/update-requirements-reference.py — do not edit manually.
# Source: flow-over-heated-plate/fluid-su2/requirements.txt
# Generated: 2026-07-13T16:48:40Z

numpy==1.26.4
pyprecice==3.4.0

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,21 @@
from matplotlib import pyplot as plt
import numpy as np
import os
from pathlib import Path

TUTORIAL_ROOT = Path(__file__).resolve().parent.parent


def vtk_to_dict(case):
vtkFileName = "solid-{}/precice-exports/Fluid-Mesh-Solid.dt100.vtu".format(
vtkFileName = TUTORIAL_ROOT / "solid-{}/precice-exports/Fluid-Mesh-Solid.dt100.vtu".format(
case)
if not os.path.exists(vtkFileName):
print("No file found for " + vtkFileName)
print("No file found for " + str(vtkFileName))
return {} # return empty dict if file not found

# read the vtk file as an unstructured grid
reader = vtk.vtkXMLUnstructuredGridReader()
reader.SetFileName(vtkFileName)
reader.SetFileName(str(vtkFileName))
reader.Update()

# obtain the data
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Pinned Python dependency versions for this tutorial participant.
# Reference only: run scripts keep using loose requirements.txt constraints.
# Generated by tools/releasing/update-requirements-reference.py — do not edit manually.
# Source: flow-over-heated-plate/plot-final-interface-temperature/requirements.txt
# Generated: 2026-07-13T16:48:40Z

numpy==1.26.4
matplotlib==3.11.0
vtk==9.6.2
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
numpy >1, <2
matplotlib>=3,<4
vtk>=9,<10
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Pinned Python dependency versions for this tutorial participant.
# Reference only: run scripts keep using loose requirements.txt constraints.
# Generated by tools/releasing/update-requirements-reference.py — do not edit manually.
# Source: flow-over-heated-plate/solid-dunefem/requirements.txt
# Generated: 2026-07-13T16:48:40Z

dune-fem==2.12.0.2
pyprecice==3.4.0
2 changes: 1 addition & 1 deletion flow-over-heated-plate/solid-dunefem/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
dune-fem>=2.11 # Known to work with 2.11.0.5, 2.12.0.2
dune-fem>=2.11
pyprecice~=3.0
13 changes: 13 additions & 0 deletions flow-over-heated-plate/solid-fenics/requirements-reference.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Pinned Python dependency versions for this tutorial participant.
# Reference only: run scripts keep using loose requirements.txt constraints.
# Generated by tools/releasing/update-requirements-reference.py — do not edit manually.
# Source: flow-over-heated-plate/solid-fenics/requirements.txt
# Generated: 2026-07-13T16:48:40Z

fenicsprecice==2.3.0
numpy==1.26.4
fenics-dijitso==2019.1.0
# fenics-dolfin~=2019.0 # non-PyPI (system/PPA or no matching PyPI version)
fenics-ffc==2019.1.0.post0
fenics-fiat==2019.1.0
fenics-ufl-legacy==2022.3.0
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Pinned Python dependency versions for this tutorial participant.
# Reference only: run scripts keep using loose requirements.txt constraints.
# Generated by tools/releasing/update-requirements-reference.py — do not edit manually.
# Source: flow-over-heated-plate/solid-fenicsx/requirements.txt
# Generated: 2026-07-13T16:48:40Z

numpy==1.26.4
fenicsxprecice==1.0.1
mpi4py==4.1.2
4 changes: 2 additions & 2 deletions flow-over-heated-plate/solid-fenicsx/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
numpy
fenicsxprecice
numpy >1, <2
fenicsxprecice~=1.0
mpi4py>=3
10 changes: 10 additions & 0 deletions flow-over-heated-plate/solid-nutils/requirements-reference.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Pinned Python dependency versions for this tutorial participant.
# Reference only: run scripts keep using loose requirements.txt constraints.
# Generated by tools/releasing/update-requirements-reference.py — do not edit manually.
# Source: flow-over-heated-plate/solid-nutils/requirements.txt
# Generated: 2026-07-13T16:48:40Z

setuptools==83.0.0
nutils==7.3
numpy==1.26.4
pyprecice==3.4.0
2 changes: 1 addition & 1 deletion flow-over-heated-plate/solid-nutils/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
setuptools # required by nutils
setuptools>=69.0.0 # required by nutils
nutils~=7.3
numpy >1, <2
pyprecice~=3.0
9 changes: 9 additions & 0 deletions oscillator-overlap/solver-python/requirements-reference.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Pinned Python dependency versions for this tutorial participant.
# Reference only: run scripts keep using loose requirements.txt constraints.
# Generated by tools/releasing/update-requirements-reference.py — do not edit manually.
# Source: oscillator-overlap/solver-python/requirements.txt
# Generated: 2026-07-13T16:48:40Z

numpy==1.26.4
pyprecice==3.4.0
scipy==1.18.0
2 changes: 1 addition & 1 deletion oscillator-overlap/solver-python/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
numpy >1, <2
pyprecice~=3.0
scipy
scipy>=1.10,<2
Comment thread
MakisH marked this conversation as resolved.
9 changes: 9 additions & 0 deletions oscillator/mass-left-fmi/requirements-reference.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Pinned Python dependency versions for this tutorial participant.
# Reference only: run scripts keep using loose requirements.txt constraints.
# Generated by tools/releasing/update-requirements-reference.py — do not edit manually.
# Source: oscillator/mass-left-fmi/requirements.txt
# Generated: 2026-07-13T16:48:40Z

pyprecice==3.4.0
fmiprecice==0.2.1
pandas==2.3.3
4 changes: 2 additions & 2 deletions oscillator/mass-left-fmi/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
pyprecice~=3.0
fmiprecice
pandas
fmiprecice~=0.2
pandas>=2.0,<3
Comment thread
MakisH marked this conversation as resolved.
9 changes: 9 additions & 0 deletions oscillator/mass-right-fmi/requirements-reference.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Pinned Python dependency versions for this tutorial participant.
# Reference only: run scripts keep using loose requirements.txt constraints.
# Generated by tools/releasing/update-requirements-reference.py — do not edit manually.
# Source: oscillator/mass-right-fmi/requirements.txt
# Generated: 2026-07-13T16:48:40Z

pyprecice==3.4.0
fmiprecice==0.2.1
pandas==2.3.3
4 changes: 2 additions & 2 deletions oscillator/mass-right-fmi/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
pyprecice~=3.0
fmiprecice
pandas
fmiprecice~=0.2
pandas>=2.0,<3
9 changes: 9 additions & 0 deletions oscillator/solver-fmi/requirements-reference.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Pinned Python dependency versions for this tutorial participant.
# Reference only: run scripts keep using loose requirements.txt constraints.
# Generated by tools/releasing/update-requirements-reference.py — do not edit manually.
# Source: oscillator/solver-fmi/requirements.txt
# Generated: 2026-07-13T16:48:40Z

pyprecice==3.4.0
fmiprecice==0.2.1
pandas==2.3.3
4 changes: 2 additions & 2 deletions oscillator/solver-fmi/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
pyprecice~=3.0
fmiprecice
pandas
fmiprecice~=0.2
pandas>=2.0,<3
9 changes: 9 additions & 0 deletions oscillator/solver-python/requirements-reference.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Pinned Python dependency versions for this tutorial participant.
# Reference only: run scripts keep using loose requirements.txt constraints.
# Generated by tools/releasing/update-requirements-reference.py — do not edit manually.
# Source: oscillator/solver-python/requirements.txt
# Generated: 2026-07-13T16:48:40Z

numpy==1.26.4
pyprecice==3.4.0
scipy==1.18.0
2 changes: 1 addition & 1 deletion oscillator/solver-python/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
numpy >1, <2
pyprecice~=3.0
scipy
scipy>=1.10,<2
Loading