Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add missing requirements.txt and venvs for Python tutorials #563

Merged
merged 12 commits into from
Oct 19, 2024
Merged
11 changes: 11 additions & 0 deletions channel-transport-reaction/chemical-fenics/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
numpy >1, <2
fenicsprecice~=2.0

NiklasVin marked this conversation as resolved.
Show resolved Hide resolved
# Assuming FEniCS from ppa:fenics-packages/fenics was installed https://fenicsproject.org/download/archive/
# Use --system-site-packages in venv
fenics-dijitso==2019.2.0.dev0
fenics-dolfin==2019.2.0.13.dev0
fenics-ffc==2019.2.0.dev0
fenics-fiat==2019.2.0.dev0
fenics-ufl-legacy==2022.3.0

6 changes: 5 additions & 1 deletion channel-transport-reaction/chemical-fenics/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ set -e -u
. ../../tools/log.sh
exec > >(tee --append "$LOGFILE") 2>&1

python3 -m venv --system-site-package .venv
. .venv/bin/activate
pip install -r requirements.txt

python3 chemical-reaction-advection-diffusion.py

close_log
close_log
10 changes: 10 additions & 0 deletions channel-transport-reaction/fluid-fenics/requirements.txt
NiklasVin marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
numpy >1, <2
fenicsprecice~=2.0

NiklasVin marked this conversation as resolved.
Show resolved Hide resolved
# Assuming FEniCS from ppa:fenics-packages/fenics was installed https://fenicsproject.org/download/archive/
# Use --system-site-packages in venv
fenics-dijitso==2019.2.0.dev0
fenics-dolfin==2019.2.0.13.dev0
fenics-ffc==2019.2.0.dev0
fenics-fiat==2019.2.0.dev0
fenics-ufl-legacy==2022.3.0
5 changes: 5 additions & 0 deletions channel-transport-reaction/fluid-fenics/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ set -e -u
. ../../tools/log.sh
exec > >(tee --append "$LOGFILE") 2>&1

python3 -m venv --system-site-package .venv
. .venv/bin/activate
pip install -r requirements.txt


python3 fluid.py

close_log
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
numpy >1, <2
pyprecice~=3.0
pyprecice~=3.0
10 changes: 10 additions & 0 deletions elastic-tube-3d/solid-fenics/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
fenicsprecice~=2.0
numpy >1, <2

# Assuming FEniCS from ppa:fenics-packages/fenics was installed https://fenicsproject.org/download/archive/
# Use --system-site-packages in venv
fenics-dijitso==2019.2.0.dev0
fenics-dolfin==2019.2.0.13.dev0
fenics-ffc==2019.2.0.dev0
fenics-fiat==2019.2.0.dev0
fenics-ufl-legacy==2022.3.0
7 changes: 7 additions & 0 deletions elastic-tube-3d/solid-fenics/run.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
#!/usr/bin/env bash
set -e -u

NiklasVin marked this conversation as resolved.
Show resolved Hide resolved
. ../../tools/log.sh
exec > >(tee --append "$LOGFILE") 2>&1

python3 -m venv --system-site-package .venv
. .venv/bin/activate
pip install -r requirements.txt

python3 solid.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
fmiprecice
4 changes: 4 additions & 0 deletions flow-around-controlled-moving-cylinder/controller-fmi/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ if [ ! -f PIDcontroller.fmu ]; then
cd ../../
fi

python3 -m venv .venv
. .venv/bin/activate
pip install -r requirements.txt

fmiprecice ./fmi-settings.json ./precice-settings.json

close_log
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
pyprecice~=3.0
numpy >1, <2
4 changes: 4 additions & 0 deletions flow-around-controlled-moving-cylinder/solid-python/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ set -e -u
. ../../tools/log.sh
exec > >(tee --append "$LOGFILE") 2>&1

python3 -m venv .venv
. .venv/bin/activate
pip install -r requirements.txt

python3 solid.py ../precice-config.xml

close_log
10 changes: 10 additions & 0 deletions flow-over-heated-plate/solid-fenics/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
fenicsprecice~=2.0
numpy >1, <2

# Assuming FEniCS from ppa:fenics-packages/fenics was installed https://fenicsproject.org/download/archive/
# Use --system-site-packages in venv
fenics-dijitso==2019.2.0.dev0
fenics-dolfin==2019.2.0.13.dev0
fenics-ffc==2019.2.0.dev0
fenics-fiat==2019.2.0.dev0
fenics-ufl-legacy==2022.3.0
4 changes: 4 additions & 0 deletions flow-over-heated-plate/solid-fenics/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ set -e -u
. ../../tools/log.sh
exec > >(tee --append "$LOGFILE") 2>&1

python3 -m venv --system-site-packages .venv
. .venv/bin/activate
pip install -r requirements.txt

python3 solid.py

close_log
8 changes: 4 additions & 4 deletions oscillator-overlap/mass-left-python/run.sh
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
#!/usr/bin/env bash
set -e -u

python3 -m venv .venv
. .venv/bin/activate
pip install -r requirements.txt

. ../../tools/log.sh
exec > >(tee --append "$LOGFILE") 2>&1

python3 -m venv .venv
. .venv/bin/activate
pip install -r ../solver-python/requirements.txt

python3 ../solver-python/oscillator.py Mass-Left

close_log
8 changes: 4 additions & 4 deletions oscillator-overlap/mass-right-python/run.sh
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
#!/usr/bin/env bash
set -e -u

python3 -m venv .venv
. .venv/bin/activate
pip install -r requirements.txt

. ../../tools/log.sh
exec > >(tee --append "$LOGFILE") 2>&1

python3 -m venv .venv
. .venv/bin/activate
pip install -r ../solver-python/requirements.txt

python3 ../solver-python/oscillator.py Mass-Right

close_log
1 change: 1 addition & 0 deletions oscillator/mass-left-fmi/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
fmiprecice
4 changes: 4 additions & 0 deletions oscillator/mass-left-fmi/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ if [ ! -f ../solver-fmi/Oscillator.fmu ]; then
cd ../../../mass-left-fmi
fi

python3 -m venv .venv
. .venv/bin/activate
pip install -r requirements.txt

fmiprecice fmi-settings.json precice-settings.json
python3 ../solver-fmi/calculate-error.py ../mass-left-fmi/fmi-settings.json ../mass-left-fmi/precice-settings.json ../mass-right-fmi/fmi-settings.json ../mass-right-fmi/precice-settings.json Mass-Left

Expand Down
3 changes: 0 additions & 3 deletions oscillator/mass-left-python/requirements.txt

This file was deleted.

8 changes: 4 additions & 4 deletions oscillator/mass-left-python/run.sh
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
#!/usr/bin/env bash
set -e -u

python3 -m venv .venv
. .venv/bin/activate
pip install -r requirements.txt

. ../../tools/log.sh
exec > >(tee --append "$LOGFILE") 2>&1

python3 -m venv .venv
. .venv/bin/activate
pip install -r ../solver-python/requirements.txt

python3 ../solver-python/oscillator.py Mass-Left

close_log
1 change: 1 addition & 0 deletions oscillator/mass-right-fmi/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
fmiprecice
4 changes: 4 additions & 0 deletions oscillator/mass-right-fmi/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ if [ ! -f ../solver-fmi/Oscillator.fmu ]; then
cd ../../../mass-right-fmi
fi

python3 -m venv .venv
. .venv/bin/activate
pip install -r requirements.txt

fmiprecice fmi-settings.json precice-settings.json
python3 ../solver-fmi/calculate-error.py ../mass-left-fmi/fmi-settings.json ../mass-left-fmi/precice-settings.json ../mass-right-fmi/fmi-settings.json ../mass-right-fmi/precice-settings.json Mass-Right

Expand Down
3 changes: 0 additions & 3 deletions oscillator/mass-right-python/requirements.txt

This file was deleted.

8 changes: 4 additions & 4 deletions oscillator/mass-right-python/run.sh
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
#!/usr/bin/env bash
set -e -u

python3 -m venv .venv
. .venv/bin/activate
pip install -r requirements.txt

. ../../tools/log.sh
exec > >(tee --append "$LOGFILE") 2>&1

python3 -m venv .venv
. .venv/bin/activate
pip install -r ../solver-python/requirements.txt

python3 ../solver-python/oscillator.py Mass-Right

close_log
1 change: 1 addition & 0 deletions oscillator/solver-fmi/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
fmiprecice
4 changes: 4 additions & 0 deletions partitioned-heat-conduction-complex/dirichlet-fenics/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ set -e -u
. ../../tools/log.sh
exec > >(tee --append "$LOGFILE") 2>&1

python3 -m venv --system-site-packages .venv
. .venv/bin/activate
pip install -r ../solver-fenics/requirements.txt

python3 ../solver-fenics/heat.py -d -i complex

close_log
4 changes: 4 additions & 0 deletions partitioned-heat-conduction-complex/neumann-fenics/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ set -e -u
. ../../tools/log.sh
exec > >(tee --append "$LOGFILE") 2>&1

python3 -m venv --system-site-packages .venv
. .venv/bin/activate
pip install -r ../solver-fenics/requirements.txt

python3 ../solver-fenics/heat.py -n -i complex

close_log
11 changes: 11 additions & 0 deletions partitioned-heat-conduction-complex/solver-fenics/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
fenicsprecice~=2.0
numpy >1, <2
sympy

# Assuming FEniCS from ppa:fenics-packages/fenics was installed https://fenicsproject.org/download/archive/
# Use --system-site-packages in venv
fenics-dijitso==2019.2.0.dev0
fenics-dolfin==2019.2.0.13.dev0
fenics-ffc==2019.2.0.dev0
fenics-fiat==2019.2.0.dev0
fenics-ufl-legacy==2022.3.0
4 changes: 4 additions & 0 deletions partitioned-heat-conduction-overlap/left-fenics/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ set -e -u
. ../../tools/log.sh
exec > >(tee --append "$LOGFILE") 2>&1

python3 -m venv --system-site-packages .venv
. .venv/bin/activate
pip install -r ../solver-fenics/requirements.txt

python3 ../solver-fenics/heat.py Left

close_log
4 changes: 4 additions & 0 deletions partitioned-heat-conduction-overlap/right-fenics/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ set -e -u
. ../../tools/log.sh
exec > >(tee --append "$LOGFILE") 2>&1

python3 -m venv --system-site-packages .venv
. .venv/bin/activate
pip install -r ../solver-fenics/requirements.txt

python3 ../solver-fenics/heat.py Right

close_log
10 changes: 10 additions & 0 deletions partitioned-heat-conduction-overlap/solver-fenics/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
fenicsprecice~=2.0
numpy >1, <2

# Assuming FEniCS from ppa:fenics-packages/fenics was installed https://fenicsproject.org/download/archive/
# Use --system-site-packages in venv
fenics-dijitso==2019.2.0.dev0
fenics-dolfin==2019.2.0.13.dev0
fenics-ffc==2019.2.0.dev0
fenics-fiat==2019.2.0.dev0
fenics-ufl-legacy==2022.3.0
4 changes: 4 additions & 0 deletions partitioned-heat-conduction/neumann-fenics/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ pip install -r ../solver-fenics/requirements.txt
. ../../tools/log.sh
exec > >(tee --append "$LOGFILE") 2>&1

python3 -m venv --system-site-packages .venv
. .venv/bin/activate
pip install -r ../solver-fenics/requirements.txt

python3 ../solver-fenics/heat.py Neumann

close_log
11 changes: 11 additions & 0 deletions perpendicular-flap/solid-fenics/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
fenicsprecice~=2.0
numpy >1, <2
matplotlib

# Assuming FEniCS from ppa:fenics-packages/fenics was installed https://fenicsproject.org/download/archive/
# Use --system-site-packages in venv
fenics-dijitso==2019.2.0.dev0
fenics-dolfin==2019.2.0.13.dev0
fenics-ffc==2019.2.0.dev0
fenics-fiat==2019.2.0.dev0
fenics-ufl-legacy==2022.3.0
4 changes: 4 additions & 0 deletions perpendicular-flap/solid-fenics/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ set -e -u
. ../../tools/log.sh
exec > >(tee --append "$LOGFILE") 2>&1

python3 -m venv --system-site-packages .venv
. .venv/bin/activate
pip install -r requirements.txt

python3 solid.py

close_log
4 changes: 4 additions & 0 deletions volume-coupled-diffusion/drain-fenics/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ set -e -u
. ../../tools/log.sh
exec > >(tee --append "$LOGFILE") 2>&1

python3 -m venv --system-site-packages .venv
. .venv/bin/activate
pip install -r ../solver-fenics/requirements.txt

python3 ../solver-fenics/volume-coupled-diffusion.py --drain

close_log
10 changes: 10 additions & 0 deletions volume-coupled-diffusion/solver-fenics/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
fenicsprecice~=2.0
numpy >1, <2

# Assuming FEniCS from ppa:fenics-packages/fenics was installed https://fenicsproject.org/download/archive/
# Use --system-site-packages in venv
fenics-dijitso==2019.2.0.dev0
fenics-dolfin==2019.2.0.13.dev0
fenics-ffc==2019.2.0.dev0
fenics-fiat==2019.2.0.dev0
fenics-ufl-legacy==2022.3.0
4 changes: 4 additions & 0 deletions volume-coupled-diffusion/source-fenics/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ set -e -u
. ../../tools/log.sh
exec > >(tee --append "$LOGFILE") 2>&1

python3 -m venv --system-site-packages .venv
. .venv/bin/activate
pip install -r ../solver-fenics/requirements.txt

python3 ../solver-fenics/volume-coupled-diffusion.py --source

close_log