-
-
Notifications
You must be signed in to change notification settings - Fork 114
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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 <benjamin.rodenberg@cit.tum.de>
- Loading branch information
1 parent
ff04dc4
commit 88873b3
Showing
6 changed files
with
566 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,43 @@ | ||
#!/usr/bin/env bash | ||
set -e -u | ||
|
||
python3 -m venv --system-site-packages ../solver-fenics/.venv | ||
. ../solver-fenics/.venv/bin/activate | ||
pip install -r ../solver-fenics/requirements.txt | ||
|
||
. ../../tools/log.sh | ||
exec > >(tee --append "$LOGFILE") 2>&1 | ||
|
||
python3 ../solver-fenics/heat.py Dirichlet | ||
if [ $# -eq 0 ] | ||
then | ||
echo "Running simulation with default FEniCS implementation" | ||
python3 ../solver-fenics/heat.py Dirichlet | ||
else | ||
case "$1" in | ||
-[hH]|--help) | ||
echo "Usage: $0 [highorder|sdc|*]" | ||
echo "" | ||
echo " irk : Run simulation with higher-order implicit Runge-Kutta schemes FEniCS implementation" | ||
echo " sdc : Run simulation with pySDC+FEniCS implementation" | ||
echo " * : For every other input run the simulation with default FEniCS implementation" | ||
exit 0 | ||
;; | ||
irk) | ||
echo "Running simulation with higher-order implicit Runge-Kutta schemes FEniCS implementation" | ||
python3 ../solver-fenics/heatHigherOrder.py Dirichlet | ||
;; | ||
sdc) | ||
# install pySDC + its dependencies only if needed | ||
pip install git+https://github.com/Parallel-in-Time/pySDC@5.4.3 | ||
pip install pySDC~=5.4 | ||
echo "Running simulation with pySDC+FEniCS implementation" | ||
python3 ../solver-fenics/heat_pySDC.py Dirichlet | ||
;; | ||
*) | ||
echo "Running simulation with default FEniCS implementation" | ||
python3 ../solver-fenics/heat.py Dirichlet | ||
;; | ||
esac | ||
fi | ||
|
||
close_log |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.