From 7562b86d1e0f284ac7a1bed5b82c57d0bca5ea81 Mon Sep 17 00:00:00 2001 From: Gerasimos Chourdakis Date: Sun, 31 May 2026 08:27:41 +0200 Subject: [PATCH] Do not try to create the venv if it already exists --- channel-transport-particles/fluid-nutils/run.sh | 4 +++- channel-transport-reaction/chemical-fenics/run.sh | 4 +++- channel-transport-reaction/fluid-fenics/run.sh | 4 +++- channel-transport/fluid-nutils/run.sh | 4 +++- channel-transport/transport-nutils/run.sh | 4 +++- elastic-tube-1d/fluid-python/run.sh | 4 +++- elastic-tube-1d/solid-python/run.sh | 4 +++- elastic-tube-3d/solid-fenics/run.sh | 4 +++- flow-around-controlled-moving-cylinder/controller-fmi/run.sh | 4 +++- flow-around-controlled-moving-cylinder/solid-python/run.sh | 4 +++- flow-over-heated-plate/fluid-su2/run.sh | 4 +++- flow-over-heated-plate/solid-dunefem/run.sh | 4 +++- flow-over-heated-plate/solid-fenics/run.sh | 4 +++- flow-over-heated-plate/solid-fenicsx/run.sh | 4 +++- flow-over-heated-plate/solid-nutils/run.sh | 4 +++- oscillator-overlap/mass-left-python/run.sh | 4 +++- oscillator-overlap/mass-right-python/run.sh | 4 +++- oscillator/mass-left-fmi/run.sh | 4 +++- oscillator/mass-left-python/run.sh | 4 +++- oscillator/mass-right-fmi/run.sh | 4 +++- oscillator/mass-right-python/run.sh | 4 +++- partitioned-heat-conduction-complex/dirichlet-fenics/run.sh | 4 +++- partitioned-heat-conduction-complex/neumann-fenics/run.sh | 4 +++- partitioned-heat-conduction-direct/dirichlet-nutils/run.sh | 4 +++- partitioned-heat-conduction-direct/neumann-nutils/run.sh | 4 +++- partitioned-heat-conduction-overlap/left-fenics/run.sh | 4 +++- partitioned-heat-conduction-overlap/right-fenics/run.sh | 4 +++- partitioned-heat-conduction/dirichlet-fenics/run.sh | 4 +++- partitioned-heat-conduction/dirichlet-fenicsx/run.sh | 4 +++- partitioned-heat-conduction/dirichlet-nutils/run.sh | 4 +++- partitioned-heat-conduction/neumann-fenics/run.sh | 4 +++- partitioned-heat-conduction/neumann-fenicsx/run.sh | 4 +++- partitioned-heat-conduction/neumann-nutils/run.sh | 4 +++- partitioned-pipe-multiscale/fluid1d-left-nutils/run.sh | 4 +++- partitioned-pipe-multiscale/fluid1d-right-nutils/run.sh | 4 +++- perpendicular-flap/fluid-fake/run.sh | 4 +++- perpendicular-flap/fluid-nutils/run.sh | 4 +++- perpendicular-flap/fluid-su2/run.sh | 4 +++- perpendicular-flap/solid-fake/run.sh | 4 +++- perpendicular-flap/solid-fenics/run.sh | 4 +++- perpendicular-flap/solid-nutils/run.sh | 4 +++- resonant-circuit/capacitor-python/run.sh | 4 +++- resonant-circuit/coil-python/run.sh | 4 +++- tools/visualize-configs.sh | 4 +++- turek-hron-fsi3/fluid-nutils/run.sh | 4 +++- turek-hron-fsi3/solid-nutils/run.sh | 4 +++- two-scale-heat-conduction/macro-nutils/run.sh | 4 +++- two-scale-heat-conduction/micro-nutils/run.sh | 4 +++- volume-coupled-diffusion/drain-fenics/run.sh | 4 +++- volume-coupled-diffusion/source-fenics/run.sh | 4 +++- volume-coupled-flow/source-nutils/run.sh | 4 +++- water-hammer/fluid1d-left-nutils/run.sh | 4 +++- water-hammer/fluid1d-right-nutils/run.sh | 4 +++- 53 files changed, 159 insertions(+), 53 deletions(-) diff --git a/channel-transport-particles/fluid-nutils/run.sh b/channel-transport-particles/fluid-nutils/run.sh index 641f4f465..7a46ac17e 100755 --- a/channel-transport-particles/fluid-nutils/run.sh +++ b/channel-transport-particles/fluid-nutils/run.sh @@ -6,7 +6,9 @@ exec > >(tee --append "$LOGFILE") 2>&1 if [ ! -v PRECICE_TUTORIALS_NO_VENV ] then - python3 -m venv .venv + if [ ! -d .venv ]; then + python3 -m venv .venv + fi . .venv/bin/activate pip install -r requirements.txt && pip freeze > pip-installed-packages.log fi diff --git a/channel-transport-reaction/chemical-fenics/run.sh b/channel-transport-reaction/chemical-fenics/run.sh index e0927a968..9409a4a4e 100755 --- a/channel-transport-reaction/chemical-fenics/run.sh +++ b/channel-transport-reaction/chemical-fenics/run.sh @@ -6,7 +6,9 @@ exec > >(tee --append "$LOGFILE") 2>&1 if [ ! -v PRECICE_TUTORIALS_NO_VENV ] then - python3 -m venv --system-site-package .venv + if [ ! -d .venv ]; then + python3 -m venv --system-site-packages .venv + fi . .venv/bin/activate pip install -r requirements.txt && pip freeze > pip-installed-packages.log fi diff --git a/channel-transport-reaction/fluid-fenics/run.sh b/channel-transport-reaction/fluid-fenics/run.sh index ff60931b0..b2b440be5 100755 --- a/channel-transport-reaction/fluid-fenics/run.sh +++ b/channel-transport-reaction/fluid-fenics/run.sh @@ -6,7 +6,9 @@ exec > >(tee --append "$LOGFILE") 2>&1 if [ ! -v PRECICE_TUTORIALS_NO_VENV ] then - python3 -m venv --system-site-package .venv + if [ ! -d .venv ]; then + python3 -m venv --system-site-packages .venv + fi . .venv/bin/activate pip install -r requirements.txt && pip freeze > pip-installed-packages.log fi diff --git a/channel-transport/fluid-nutils/run.sh b/channel-transport/fluid-nutils/run.sh index 641f4f465..7a46ac17e 100755 --- a/channel-transport/fluid-nutils/run.sh +++ b/channel-transport/fluid-nutils/run.sh @@ -6,7 +6,9 @@ exec > >(tee --append "$LOGFILE") 2>&1 if [ ! -v PRECICE_TUTORIALS_NO_VENV ] then - python3 -m venv .venv + if [ ! -d .venv ]; then + python3 -m venv .venv + fi . .venv/bin/activate pip install -r requirements.txt && pip freeze > pip-installed-packages.log fi diff --git a/channel-transport/transport-nutils/run.sh b/channel-transport/transport-nutils/run.sh index c36a5bf49..4f07bdeab 100755 --- a/channel-transport/transport-nutils/run.sh +++ b/channel-transport/transport-nutils/run.sh @@ -6,7 +6,9 @@ exec > >(tee --append "$LOGFILE") 2>&1 if [ ! -v PRECICE_TUTORIALS_NO_VENV ] then - python3 -m venv .venv + if [ ! -d .venv ]; then + python3 -m venv .venv + fi . .venv/bin/activate pip install -r requirements.txt && pip freeze > pip-installed-packages.log fi diff --git a/elastic-tube-1d/fluid-python/run.sh b/elastic-tube-1d/fluid-python/run.sh index 381bf0c1b..3c05487b6 100755 --- a/elastic-tube-1d/fluid-python/run.sh +++ b/elastic-tube-1d/fluid-python/run.sh @@ -6,7 +6,9 @@ exec > >(tee --append "$LOGFILE") 2>&1 if [ ! -v PRECICE_TUTORIALS_NO_VENV ] then - python3 -m venv .venv + if [ ! -d .venv ]; then + python3 -m venv .venv + fi . .venv/bin/activate pip install -r requirements.txt && pip freeze > pip-installed-packages.log fi diff --git a/elastic-tube-1d/solid-python/run.sh b/elastic-tube-1d/solid-python/run.sh index 60fba521e..06a0c2aaa 100755 --- a/elastic-tube-1d/solid-python/run.sh +++ b/elastic-tube-1d/solid-python/run.sh @@ -6,7 +6,9 @@ exec > >(tee --append "$LOGFILE") 2>&1 if [ ! -v PRECICE_TUTORIALS_NO_VENV ] then - python3 -m venv .venv + if [ ! -d .venv ]; then + python3 -m venv .venv + fi . .venv/bin/activate pip install -r requirements.txt && pip freeze > pip-installed-packages.log fi diff --git a/elastic-tube-3d/solid-fenics/run.sh b/elastic-tube-3d/solid-fenics/run.sh index a06dd46bb..5e22a5d84 100755 --- a/elastic-tube-3d/solid-fenics/run.sh +++ b/elastic-tube-3d/solid-fenics/run.sh @@ -6,7 +6,9 @@ exec > >(tee --append "$LOGFILE") 2>&1 if [ ! -v PRECICE_TUTORIALS_NO_VENV ] then - python3 -m venv --system-site-package .venv + if [ ! -d .venv ]; then + python3 -m venv --system-site-packages .venv + fi . .venv/bin/activate pip install -r requirements.txt && pip freeze > pip-installed-packages.log fi diff --git a/flow-around-controlled-moving-cylinder/controller-fmi/run.sh b/flow-around-controlled-moving-cylinder/controller-fmi/run.sh index 57be1215c..c5da7b900 100755 --- a/flow-around-controlled-moving-cylinder/controller-fmi/run.sh +++ b/flow-around-controlled-moving-cylinder/controller-fmi/run.sh @@ -17,7 +17,9 @@ fi if [ ! -v PRECICE_TUTORIALS_NO_VENV ] then - python3 -m venv .venv + if [ ! -d .venv ]; then + python3 -m venv .venv + fi . .venv/bin/activate pip install -r requirements.txt && pip freeze > pip-installed-packages.log fi diff --git a/flow-around-controlled-moving-cylinder/solid-python/run.sh b/flow-around-controlled-moving-cylinder/solid-python/run.sh index 0b6c1f894..89027ba47 100755 --- a/flow-around-controlled-moving-cylinder/solid-python/run.sh +++ b/flow-around-controlled-moving-cylinder/solid-python/run.sh @@ -6,7 +6,9 @@ exec > >(tee --append "$LOGFILE") 2>&1 if [ ! -v PRECICE_TUTORIALS_NO_VENV ] then - python3 -m venv .venv + if [ ! -d .venv ]; then + python3 -m venv .venv + fi . .venv/bin/activate pip install -r requirements.txt && pip freeze > pip-installed-packages.log fi diff --git a/flow-over-heated-plate/fluid-su2/run.sh b/flow-over-heated-plate/fluid-su2/run.sh index db3ab8b76..20d439355 100755 --- a/flow-over-heated-plate/fluid-su2/run.sh +++ b/flow-over-heated-plate/fluid-su2/run.sh @@ -6,7 +6,9 @@ exec > >(tee --append "$LOGFILE") 2>&1 if [ ! -v PRECICE_TUTORIALS_NO_VENV ] then - python3 -m venv --system-site-package .venv + if [ ! -d .venv ]; then + python3 -m venv --system-site-packages .venv + fi . .venv/bin/activate pip install -r requirements.txt && pip freeze > pip-installed-packages.log fi diff --git a/flow-over-heated-plate/solid-dunefem/run.sh b/flow-over-heated-plate/solid-dunefem/run.sh index 3c0c73f5c..01049fa9e 100755 --- a/flow-over-heated-plate/solid-dunefem/run.sh +++ b/flow-over-heated-plate/solid-dunefem/run.sh @@ -6,7 +6,9 @@ exec > >(tee --append "$LOGFILE") 2>&1 if [ ! -v PRECICE_TUTORIALS_NO_VENV ] then - python3 -m venv .venv + if [ ! -d .venv ]; then + python3 -m venv .venv + fi . .venv/bin/activate pip install -r requirements.txt && pip freeze > pip-installed-packages.log fi diff --git a/flow-over-heated-plate/solid-fenics/run.sh b/flow-over-heated-plate/solid-fenics/run.sh index 3a0977996..649dca1aa 100755 --- a/flow-over-heated-plate/solid-fenics/run.sh +++ b/flow-over-heated-plate/solid-fenics/run.sh @@ -6,7 +6,9 @@ exec > >(tee --append "$LOGFILE") 2>&1 if [ ! -v PRECICE_TUTORIALS_NO_VENV ] then - python3 -m venv --system-site-package .venv + if [ ! -d .venv ]; then + python3 -m venv --system-site-packages .venv + fi . .venv/bin/activate pip install -r requirements.txt && pip freeze > pip-installed-packages.log fi diff --git a/flow-over-heated-plate/solid-fenicsx/run.sh b/flow-over-heated-plate/solid-fenicsx/run.sh index a95847662..01793a3e7 100755 --- a/flow-over-heated-plate/solid-fenicsx/run.sh +++ b/flow-over-heated-plate/solid-fenicsx/run.sh @@ -1,7 +1,9 @@ #!/bin/sh set -e -u -python3 -m venv --system-site-packages .venv +if [ ! -d .venv ]; then + python3 -m venv --system-site-packages .venv + fi . .venv/bin/activate pip install -r requirements.txt diff --git a/flow-over-heated-plate/solid-nutils/run.sh b/flow-over-heated-plate/solid-nutils/run.sh index 3c0c73f5c..01049fa9e 100755 --- a/flow-over-heated-plate/solid-nutils/run.sh +++ b/flow-over-heated-plate/solid-nutils/run.sh @@ -6,7 +6,9 @@ exec > >(tee --append "$LOGFILE") 2>&1 if [ ! -v PRECICE_TUTORIALS_NO_VENV ] then - python3 -m venv .venv + if [ ! -d .venv ]; then + python3 -m venv .venv + fi . .venv/bin/activate pip install -r requirements.txt && pip freeze > pip-installed-packages.log fi diff --git a/oscillator-overlap/mass-left-python/run.sh b/oscillator-overlap/mass-left-python/run.sh index 5a9c18658..361b2d2a2 100755 --- a/oscillator-overlap/mass-left-python/run.sh +++ b/oscillator-overlap/mass-left-python/run.sh @@ -6,7 +6,9 @@ exec > >(tee --append "$LOGFILE") 2>&1 if [ ! -v PRECICE_TUTORIALS_NO_VENV ] then - python3 -m venv .venv + if [ ! -d .venv ]; then + python3 -m venv .venv + fi . .venv/bin/activate pip install -r ../solver-python/requirements.txt && pip freeze > pip-installed-packages.log fi diff --git a/oscillator-overlap/mass-right-python/run.sh b/oscillator-overlap/mass-right-python/run.sh index be993c49f..82ab74754 100755 --- a/oscillator-overlap/mass-right-python/run.sh +++ b/oscillator-overlap/mass-right-python/run.sh @@ -6,7 +6,9 @@ exec > >(tee --append "$LOGFILE") 2>&1 if [ ! -v PRECICE_TUTORIALS_NO_VENV ] then - python3 -m venv .venv + if [ ! -d .venv ]; then + python3 -m venv .venv + fi . .venv/bin/activate pip install -r ../solver-python/requirements.txt && pip freeze > pip-installed-packages.log fi diff --git a/oscillator/mass-left-fmi/run.sh b/oscillator/mass-left-fmi/run.sh index 2e6f83142..6a7699269 100755 --- a/oscillator/mass-left-fmi/run.sh +++ b/oscillator/mass-left-fmi/run.sh @@ -20,7 +20,9 @@ fi if [ ! -v PRECICE_TUTORIALS_NO_VENV ] then - python3 -m venv .venv + if [ ! -d .venv ]; then + python3 -m venv .venv + fi . .venv/bin/activate pip install -r requirements.txt && pip freeze > pip-installed-packages.log fi diff --git a/oscillator/mass-left-python/run.sh b/oscillator/mass-left-python/run.sh index 5a9c18658..361b2d2a2 100755 --- a/oscillator/mass-left-python/run.sh +++ b/oscillator/mass-left-python/run.sh @@ -6,7 +6,9 @@ exec > >(tee --append "$LOGFILE") 2>&1 if [ ! -v PRECICE_TUTORIALS_NO_VENV ] then - python3 -m venv .venv + if [ ! -d .venv ]; then + python3 -m venv .venv + fi . .venv/bin/activate pip install -r ../solver-python/requirements.txt && pip freeze > pip-installed-packages.log fi diff --git a/oscillator/mass-right-fmi/run.sh b/oscillator/mass-right-fmi/run.sh index 0d1d37574..94294b07b 100755 --- a/oscillator/mass-right-fmi/run.sh +++ b/oscillator/mass-right-fmi/run.sh @@ -20,7 +20,9 @@ fi if [ ! -v PRECICE_TUTORIALS_NO_VENV ] then - python3 -m venv .venv + if [ ! -d .venv ]; then + python3 -m venv .venv + fi . .venv/bin/activate pip install -r requirements.txt && pip freeze > pip-installed-packages.log fi diff --git a/oscillator/mass-right-python/run.sh b/oscillator/mass-right-python/run.sh index be993c49f..82ab74754 100755 --- a/oscillator/mass-right-python/run.sh +++ b/oscillator/mass-right-python/run.sh @@ -6,7 +6,9 @@ exec > >(tee --append "$LOGFILE") 2>&1 if [ ! -v PRECICE_TUTORIALS_NO_VENV ] then - python3 -m venv .venv + if [ ! -d .venv ]; then + python3 -m venv .venv + fi . .venv/bin/activate pip install -r ../solver-python/requirements.txt && pip freeze > pip-installed-packages.log fi diff --git a/partitioned-heat-conduction-complex/dirichlet-fenics/run.sh b/partitioned-heat-conduction-complex/dirichlet-fenics/run.sh index feccfc7b7..7f2251819 100755 --- a/partitioned-heat-conduction-complex/dirichlet-fenics/run.sh +++ b/partitioned-heat-conduction-complex/dirichlet-fenics/run.sh @@ -6,7 +6,9 @@ exec > >(tee --append "$LOGFILE") 2>&1 if [ ! -v PRECICE_TUTORIALS_NO_VENV ] then - python3 -m venv --system-site-packages .venv + if [ ! -d .venv ]; then + python3 -m venv --system-site-packages .venv + fi . .venv/bin/activate pip install -r ../solver-fenics/requirements.txt fi diff --git a/partitioned-heat-conduction-complex/neumann-fenics/run.sh b/partitioned-heat-conduction-complex/neumann-fenics/run.sh index e505b7711..4c82b9962 100755 --- a/partitioned-heat-conduction-complex/neumann-fenics/run.sh +++ b/partitioned-heat-conduction-complex/neumann-fenics/run.sh @@ -6,7 +6,9 @@ exec > >(tee --append "$LOGFILE") 2>&1 if [ ! -v PRECICE_TUTORIALS_NO_VENV ] then - python3 -m venv --system-site-packages .venv + if [ ! -d .venv ]; then + python3 -m venv --system-site-packages .venv + fi . .venv/bin/activate pip install -r ../solver-fenics/requirements.txt fi diff --git a/partitioned-heat-conduction-direct/dirichlet-nutils/run.sh b/partitioned-heat-conduction-direct/dirichlet-nutils/run.sh index 2d3ff34db..01f0bd50a 100755 --- a/partitioned-heat-conduction-direct/dirichlet-nutils/run.sh +++ b/partitioned-heat-conduction-direct/dirichlet-nutils/run.sh @@ -6,7 +6,9 @@ exec > >(tee --append "$LOGFILE") 2>&1 if [ ! -v PRECICE_TUTORIALS_NO_VENV ] then - python3 -m venv .venv + if [ ! -d .venv ]; then + python3 -m venv .venv + fi . .venv/bin/activate pip install -r requirements.txt && pip freeze > pip-installed-packages.log fi diff --git a/partitioned-heat-conduction-direct/neumann-nutils/run.sh b/partitioned-heat-conduction-direct/neumann-nutils/run.sh index 54734b5f9..8fab51f89 100755 --- a/partitioned-heat-conduction-direct/neumann-nutils/run.sh +++ b/partitioned-heat-conduction-direct/neumann-nutils/run.sh @@ -6,7 +6,9 @@ exec > >(tee --append "$LOGFILE") 2>&1 if [ ! -v PRECICE_TUTORIALS_NO_VENV ] then - python3 -m venv .venv + if [ ! -d .venv ]; then + python3 -m venv .venv + fi . .venv/bin/activate pip install -r requirements.txt && pip freeze > pip-installed-packages.log fi diff --git a/partitioned-heat-conduction-overlap/left-fenics/run.sh b/partitioned-heat-conduction-overlap/left-fenics/run.sh index b19c1f5d9..af99ead39 100755 --- a/partitioned-heat-conduction-overlap/left-fenics/run.sh +++ b/partitioned-heat-conduction-overlap/left-fenics/run.sh @@ -6,7 +6,9 @@ exec > >(tee --append "$LOGFILE") 2>&1 if [ ! -v PRECICE_TUTORIALS_NO_VENV ] then - python3 -m venv --system-site-packages .venv + if [ ! -d .venv ]; then + python3 -m venv --system-site-packages .venv + fi . .venv/bin/activate pip install -r ../solver-fenics/requirements.txt fi diff --git a/partitioned-heat-conduction-overlap/right-fenics/run.sh b/partitioned-heat-conduction-overlap/right-fenics/run.sh index b8f73ac22..dfbabbdfe 100755 --- a/partitioned-heat-conduction-overlap/right-fenics/run.sh +++ b/partitioned-heat-conduction-overlap/right-fenics/run.sh @@ -6,7 +6,9 @@ exec > >(tee --append "$LOGFILE") 2>&1 if [ ! -v PRECICE_TUTORIALS_NO_VENV ] then - python3 -m venv --system-site-packages .venv + if [ ! -d .venv ]; then + python3 -m venv --system-site-packages .venv + fi . .venv/bin/activate pip install -r ../solver-fenics/requirements.txt fi diff --git a/partitioned-heat-conduction/dirichlet-fenics/run.sh b/partitioned-heat-conduction/dirichlet-fenics/run.sh index 880f966a2..288101292 100755 --- a/partitioned-heat-conduction/dirichlet-fenics/run.sh +++ b/partitioned-heat-conduction/dirichlet-fenics/run.sh @@ -6,7 +6,9 @@ exec > >(tee --append "$LOGFILE") 2>&1 if [ ! -v PRECICE_TUTORIALS_NO_VENV ] then - python3 -m venv --system-site-packages .venv + if [ ! -d .venv ]; then + python3 -m venv --system-site-packages .venv + fi . .venv/bin/activate pip install -r ../solver-fenics/requirements.txt fi diff --git a/partitioned-heat-conduction/dirichlet-fenicsx/run.sh b/partitioned-heat-conduction/dirichlet-fenicsx/run.sh index cc7202ffb..81dc8e08c 100755 --- a/partitioned-heat-conduction/dirichlet-fenicsx/run.sh +++ b/partitioned-heat-conduction/dirichlet-fenicsx/run.sh @@ -1,7 +1,9 @@ #!/bin/sh set -e -u -python3 -m venv --system-site-packages .venv +if [ ! -d .venv ]; then + python3 -m venv --system-site-packages .venv + fi . .venv/bin/activate pip install -r ../solver-fenicsx/requirements.txt diff --git a/partitioned-heat-conduction/dirichlet-nutils/run.sh b/partitioned-heat-conduction/dirichlet-nutils/run.sh index 2d3ff34db..01f0bd50a 100755 --- a/partitioned-heat-conduction/dirichlet-nutils/run.sh +++ b/partitioned-heat-conduction/dirichlet-nutils/run.sh @@ -6,7 +6,9 @@ exec > >(tee --append "$LOGFILE") 2>&1 if [ ! -v PRECICE_TUTORIALS_NO_VENV ] then - python3 -m venv .venv + if [ ! -d .venv ]; then + python3 -m venv .venv + fi . .venv/bin/activate pip install -r requirements.txt && pip freeze > pip-installed-packages.log fi diff --git a/partitioned-heat-conduction/neumann-fenics/run.sh b/partitioned-heat-conduction/neumann-fenics/run.sh index cc7a42c41..d71a3122f 100755 --- a/partitioned-heat-conduction/neumann-fenics/run.sh +++ b/partitioned-heat-conduction/neumann-fenics/run.sh @@ -6,7 +6,9 @@ exec > >(tee --append "$LOGFILE") 2>&1 if [ ! -v PRECICE_TUTORIALS_NO_VENV ] then - python3 -m venv --system-site-packages .venv + if [ ! -d .venv ]; then + python3 -m venv --system-site-packages .venv + fi . .venv/bin/activate pip install -r ../solver-fenics/requirements.txt fi diff --git a/partitioned-heat-conduction/neumann-fenicsx/run.sh b/partitioned-heat-conduction/neumann-fenicsx/run.sh index b676e0c94..c352157be 100755 --- a/partitioned-heat-conduction/neumann-fenicsx/run.sh +++ b/partitioned-heat-conduction/neumann-fenicsx/run.sh @@ -1,7 +1,9 @@ #!/bin/sh set -e -u -python3 -m venv --system-site-packages .venv +if [ ! -d .venv ]; then + python3 -m venv --system-site-packages .venv + fi . .venv/bin/activate pip install -r ../solver-fenicsx/requirements.txt python3 ../solver-fenicsx/heat.py Neumann diff --git a/partitioned-heat-conduction/neumann-nutils/run.sh b/partitioned-heat-conduction/neumann-nutils/run.sh index 54734b5f9..8fab51f89 100755 --- a/partitioned-heat-conduction/neumann-nutils/run.sh +++ b/partitioned-heat-conduction/neumann-nutils/run.sh @@ -6,7 +6,9 @@ exec > >(tee --append "$LOGFILE") 2>&1 if [ ! -v PRECICE_TUTORIALS_NO_VENV ] then - python3 -m venv .venv + if [ ! -d .venv ]; then + python3 -m venv .venv + fi . .venv/bin/activate pip install -r requirements.txt && pip freeze > pip-installed-packages.log fi diff --git a/partitioned-pipe-multiscale/fluid1d-left-nutils/run.sh b/partitioned-pipe-multiscale/fluid1d-left-nutils/run.sh index fb474e9a8..74f5dff15 100755 --- a/partitioned-pipe-multiscale/fluid1d-left-nutils/run.sh +++ b/partitioned-pipe-multiscale/fluid1d-left-nutils/run.sh @@ -6,7 +6,9 @@ exec > >(tee --append "$LOGFILE") 2>&1 if [ ! -v PRECICE_TUTORIALS_NO_VENV ] then - python3 -m venv .venv + if [ ! -d .venv ]; then + python3 -m venv .venv + fi . .venv/bin/activate pip install -r requirements.txt && pip freeze > pip-installed-packages.log fi diff --git a/partitioned-pipe-multiscale/fluid1d-right-nutils/run.sh b/partitioned-pipe-multiscale/fluid1d-right-nutils/run.sh index 0593f1eeb..da8cfab83 100755 --- a/partitioned-pipe-multiscale/fluid1d-right-nutils/run.sh +++ b/partitioned-pipe-multiscale/fluid1d-right-nutils/run.sh @@ -6,7 +6,9 @@ exec > >(tee --append "$LOGFILE") 2>&1 if [ ! -v PRECICE_TUTORIALS_NO_VENV ] then - python3 -m venv .venv + if [ ! -d .venv ]; then + python3 -m venv .venv + fi . .venv/bin/activate pip install -r requirements.txt && pip freeze > pip-installed-packages.log fi diff --git a/perpendicular-flap/fluid-fake/run.sh b/perpendicular-flap/fluid-fake/run.sh index 57ae6f24f..e33d1259b 100755 --- a/perpendicular-flap/fluid-fake/run.sh +++ b/perpendicular-flap/fluid-fake/run.sh @@ -6,7 +6,9 @@ exec > >(tee --append "$LOGFILE") 2>&1 if [ ! -v PRECICE_TUTORIALS_NO_VENV ] then - python3 -m venv .venv + if [ ! -d .venv ]; then + python3 -m venv .venv + fi . .venv/bin/activate pip install -r requirements.txt && pip freeze > pip-installed-packages.log fi diff --git a/perpendicular-flap/fluid-nutils/run.sh b/perpendicular-flap/fluid-nutils/run.sh index f68b56661..aedb2e255 100755 --- a/perpendicular-flap/fluid-nutils/run.sh +++ b/perpendicular-flap/fluid-nutils/run.sh @@ -6,7 +6,9 @@ exec > >(tee --append "$LOGFILE") 2>&1 if [ ! -v PRECICE_TUTORIALS_NO_VENV ] then - python3 -m venv .venv + if [ ! -d .venv ]; then + python3 -m venv .venv + fi . .venv/bin/activate pip install -r requirements.txt && pip freeze > pip-installed-packages.log fi diff --git a/perpendicular-flap/fluid-su2/run.sh b/perpendicular-flap/fluid-su2/run.sh index e6c7a0fcb..590a46e0f 100755 --- a/perpendicular-flap/fluid-su2/run.sh +++ b/perpendicular-flap/fluid-su2/run.sh @@ -6,7 +6,9 @@ exec > >(tee --append "$LOGFILE") 2>&1 if [ ! -v PRECICE_TUTORIALS_NO_VENV ] then - python3 -m venv --system-site-packages .venv + if [ ! -d .venv ]; then + python3 -m venv --system-site-packages .venv + fi . .venv/bin/activate pip install -r requirements.txt && pip freeze > pip-installed-packages.log fi diff --git a/perpendicular-flap/solid-fake/run.sh b/perpendicular-flap/solid-fake/run.sh index 3bd2c8542..e93deb140 100755 --- a/perpendicular-flap/solid-fake/run.sh +++ b/perpendicular-flap/solid-fake/run.sh @@ -6,7 +6,9 @@ exec > >(tee --append "$LOGFILE") 2>&1 if [ ! -v PRECICE_TUTORIALS_NO_VENV ] then - python3 -m venv .venv + if [ ! -d .venv ]; then + python3 -m venv .venv + fi . .venv/bin/activate pip install -r requirements.txt && pip freeze > pip-installed-packages.log fi diff --git a/perpendicular-flap/solid-fenics/run.sh b/perpendicular-flap/solid-fenics/run.sh index 310a8fb12..649dca1aa 100755 --- a/perpendicular-flap/solid-fenics/run.sh +++ b/perpendicular-flap/solid-fenics/run.sh @@ -6,7 +6,9 @@ exec > >(tee --append "$LOGFILE") 2>&1 if [ ! -v PRECICE_TUTORIALS_NO_VENV ] then - python3 -m venv --system-site-packages .venv + if [ ! -d .venv ]; then + python3 -m venv --system-site-packages .venv + fi . .venv/bin/activate pip install -r requirements.txt && pip freeze > pip-installed-packages.log fi diff --git a/perpendicular-flap/solid-nutils/run.sh b/perpendicular-flap/solid-nutils/run.sh index 1b0420d63..4a74159a6 100755 --- a/perpendicular-flap/solid-nutils/run.sh +++ b/perpendicular-flap/solid-nutils/run.sh @@ -6,7 +6,9 @@ exec > >(tee --append "$LOGFILE") 2>&1 if [ ! -v PRECICE_TUTORIALS_NO_VENV ] then - python3 -m venv .venv + if [ ! -d .venv ]; then + python3 -m venv .venv + fi . .venv/bin/activate pip install -r requirements.txt && pip freeze > pip-installed-packages.log fi diff --git a/resonant-circuit/capacitor-python/run.sh b/resonant-circuit/capacitor-python/run.sh index 042124adc..ee4ecc84a 100755 --- a/resonant-circuit/capacitor-python/run.sh +++ b/resonant-circuit/capacitor-python/run.sh @@ -6,7 +6,9 @@ exec > >(tee --append "$LOGFILE") 2>&1 if [ ! -v PRECICE_TUTORIALS_NO_VENV ] then - python3 -m venv .venv + if [ ! -d .venv ]; then + python3 -m venv .venv + fi . .venv/bin/activate pip install -r requirements.txt && pip freeze > pip-installed-packages.log fi diff --git a/resonant-circuit/coil-python/run.sh b/resonant-circuit/coil-python/run.sh index 248944c23..e816881c2 100755 --- a/resonant-circuit/coil-python/run.sh +++ b/resonant-circuit/coil-python/run.sh @@ -6,7 +6,9 @@ exec > >(tee --append "$LOGFILE") 2>&1 if [ ! -v PRECICE_TUTORIALS_NO_VENV ] then - python3 -m venv .venv + if [ ! -d .venv ]; then + python3 -m venv .venv + fi . .venv/bin/activate pip install -r requirements.txt && pip freeze > pip-installed-packages.log fi diff --git a/tools/visualize-configs.sh b/tools/visualize-configs.sh index bf430eb66..a02b72895 100755 --- a/tools/visualize-configs.sh +++ b/tools/visualize-configs.sh @@ -30,7 +30,9 @@ visualize_config(){ export -f visualize_config -python3 -m venv .venv +if [ ! -d .venv ]; then + python3 -m venv .venv + fi . .venv/bin/activate pip install precice-config-visualizer diff --git a/turek-hron-fsi3/fluid-nutils/run.sh b/turek-hron-fsi3/fluid-nutils/run.sh index d0c4c71f9..1c473f01f 100755 --- a/turek-hron-fsi3/fluid-nutils/run.sh +++ b/turek-hron-fsi3/fluid-nutils/run.sh @@ -6,7 +6,9 @@ exec > >(tee --append "$LOGFILE") 2>&1 if [ ! -v PRECICE_TUTORIALS_NO_VENV ] then - python3 -m venv .venv + if [ ! -d .venv ]; then + python3 -m venv .venv + fi . .venv/bin/activate pip install -r requirements.txt && pip freeze > pip-installed-packages.log fi diff --git a/turek-hron-fsi3/solid-nutils/run.sh b/turek-hron-fsi3/solid-nutils/run.sh index 2942ab3ed..c83b503d5 100755 --- a/turek-hron-fsi3/solid-nutils/run.sh +++ b/turek-hron-fsi3/solid-nutils/run.sh @@ -6,7 +6,9 @@ exec > >(tee --append "$LOGFILE") 2>&1 if [ ! -v PRECICE_TUTORIALS_NO_VENV ] then - python3 -m venv .venv + if [ ! -d .venv ]; then + python3 -m venv .venv + fi . .venv/bin/activate pip install -r requirements.txt && pip freeze > pip-installed-packages.log fi diff --git a/two-scale-heat-conduction/macro-nutils/run.sh b/two-scale-heat-conduction/macro-nutils/run.sh index 3cf21c216..f6bd9f6b8 100755 --- a/two-scale-heat-conduction/macro-nutils/run.sh +++ b/two-scale-heat-conduction/macro-nutils/run.sh @@ -6,7 +6,9 @@ exec > >(tee --append "$LOGFILE") 2>&1 if [ ! -v PRECICE_TUTORIALS_NO_VENV ] then - python3 -m venv .venv + if [ ! -d .venv ]; then + python3 -m venv .venv + fi . .venv/bin/activate pip install -r requirements.txt && pip freeze > pip-installed-packages.log fi diff --git a/two-scale-heat-conduction/micro-nutils/run.sh b/two-scale-heat-conduction/micro-nutils/run.sh index 4e57595db..b0e7f8250 100755 --- a/two-scale-heat-conduction/micro-nutils/run.sh +++ b/two-scale-heat-conduction/micro-nutils/run.sh @@ -8,7 +8,9 @@ usage() { echo "Usage: cmd [-s] [-p n]" 1>&2; exit 1; } if [ ! -v PRECICE_TUTORIALS_NO_VENV ] then - python3 -m venv .venv + if [ ! -d .venv ]; then + python3 -m venv .venv + fi . .venv/bin/activate pip install -r requirements.txt && pip freeze > pip-installed-packages.log fi diff --git a/volume-coupled-diffusion/drain-fenics/run.sh b/volume-coupled-diffusion/drain-fenics/run.sh index c519019d6..705626ca6 100755 --- a/volume-coupled-diffusion/drain-fenics/run.sh +++ b/volume-coupled-diffusion/drain-fenics/run.sh @@ -6,7 +6,9 @@ exec > >(tee --append "$LOGFILE") 2>&1 if [ ! -v PRECICE_TUTORIALS_NO_VENV ] then - python3 -m venv --system-site-packages .venv + if [ ! -d .venv ]; then + python3 -m venv --system-site-packages .venv + fi . .venv/bin/activate pip install -r ../solver-fenics/requirements.txt fi diff --git a/volume-coupled-diffusion/source-fenics/run.sh b/volume-coupled-diffusion/source-fenics/run.sh index 76b168162..61fc2fd90 100755 --- a/volume-coupled-diffusion/source-fenics/run.sh +++ b/volume-coupled-diffusion/source-fenics/run.sh @@ -6,7 +6,9 @@ exec > >(tee --append "$LOGFILE") 2>&1 if [ ! -v PRECICE_TUTORIALS_NO_VENV ] then - python3 -m venv --system-site-packages .venv + if [ ! -d .venv ]; then + python3 -m venv --system-site-packages .venv + fi . .venv/bin/activate pip install -r ../solver-fenics/requirements.txt fi diff --git a/volume-coupled-flow/source-nutils/run.sh b/volume-coupled-flow/source-nutils/run.sh index 6af3cce86..95c4fd803 100755 --- a/volume-coupled-flow/source-nutils/run.sh +++ b/volume-coupled-flow/source-nutils/run.sh @@ -6,7 +6,9 @@ exec > >(tee --append "$LOGFILE") 2>&1 if [ ! -v PRECICE_TUTORIALS_NO_VENV ] then - python3 -m venv .venv + if [ ! -d .venv ]; then + python3 -m venv .venv + fi . .venv/bin/activate pip install -r requirements.txt && pip freeze > pip-installed-packages.log fi diff --git a/water-hammer/fluid1d-left-nutils/run.sh b/water-hammer/fluid1d-left-nutils/run.sh index fb474e9a8..74f5dff15 100755 --- a/water-hammer/fluid1d-left-nutils/run.sh +++ b/water-hammer/fluid1d-left-nutils/run.sh @@ -6,7 +6,9 @@ exec > >(tee --append "$LOGFILE") 2>&1 if [ ! -v PRECICE_TUTORIALS_NO_VENV ] then - python3 -m venv .venv + if [ ! -d .venv ]; then + python3 -m venv .venv + fi . .venv/bin/activate pip install -r requirements.txt && pip freeze > pip-installed-packages.log fi diff --git a/water-hammer/fluid1d-right-nutils/run.sh b/water-hammer/fluid1d-right-nutils/run.sh index 0593f1eeb..da8cfab83 100755 --- a/water-hammer/fluid1d-right-nutils/run.sh +++ b/water-hammer/fluid1d-right-nutils/run.sh @@ -6,7 +6,9 @@ exec > >(tee --append "$LOGFILE") 2>&1 if [ ! -v PRECICE_TUTORIALS_NO_VENV ] then - python3 -m venv .venv + if [ ! -d .venv ]; then + python3 -m venv .venv + fi . .venv/bin/activate pip install -r requirements.txt && pip freeze > pip-installed-packages.log fi