Skip to content

Commit 88873b3

Browse files
pySDC & FEniCS solver for partitioned-heat-equation (#557)
Add SDC time stepping as an option for FEniCS-bases partitioned heat conduction scenario. --------- Co-authored-by: Benjamin Rodenberg <[email protected]>
1 parent ff04dc4 commit 88873b3

File tree

6 files changed

+566
-1
lines changed

6 files changed

+566
-1
lines changed

changelog-entries/557.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
- Added SDC from pySDC as new time-stepping scheme in [partitioned-heat-conduction tutorial](https://precice.org/tutorials-partitioned-heat-conduction.html) with FEniCS.
Lines changed: 35 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,43 @@
11
#!/usr/bin/env bash
22
set -e -u
33

4+
python3 -m venv --system-site-packages ../solver-fenics/.venv
5+
. ../solver-fenics/.venv/bin/activate
6+
pip install -r ../solver-fenics/requirements.txt
7+
48
. ../../tools/log.sh
59
exec > >(tee --append "$LOGFILE") 2>&1
610

7-
python3 ../solver-fenics/heat.py Dirichlet
11+
if [ $# -eq 0 ]
12+
then
13+
echo "Running simulation with default FEniCS implementation"
14+
python3 ../solver-fenics/heat.py Dirichlet
15+
else
16+
case "$1" in
17+
-[hH]|--help)
18+
echo "Usage: $0 [highorder|sdc|*]"
19+
echo ""
20+
echo " irk : Run simulation with higher-order implicit Runge-Kutta schemes FEniCS implementation"
21+
echo " sdc : Run simulation with pySDC+FEniCS implementation"
22+
echo " * : For every other input run the simulation with default FEniCS implementation"
23+
exit 0
24+
;;
25+
irk)
26+
echo "Running simulation with higher-order implicit Runge-Kutta schemes FEniCS implementation"
27+
python3 ../solver-fenics/heatHigherOrder.py Dirichlet
28+
;;
29+
sdc)
30+
# install pySDC + its dependencies only if needed
31+
pip install git+https://github.com/Parallel-in-Time/[email protected]
32+
pip install pySDC~=5.4
33+
echo "Running simulation with pySDC+FEniCS implementation"
34+
python3 ../solver-fenics/heat_pySDC.py Dirichlet
35+
;;
36+
*)
37+
echo "Running simulation with default FEniCS implementation"
38+
python3 ../solver-fenics/heat.py Dirichlet
39+
;;
40+
esac
41+
fi
842

943
close_log

partitioned-heat-conduction/neumann-fenics/run.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
#!/usr/bin/env bash
22
set -e -u
33

4+
python3 -m venv --system-site-packages ../solver-fenics/.venv
5+
. ../solver-fenics/.venv/bin/activate
6+
pip install -r ../solver-fenics/requirements.txt
7+
48
. ../../tools/log.sh
59
exec > >(tee --append "$LOGFILE") 2>&1
610

0 commit comments

Comments
 (0)