From 8e09ac1a6e75f9fd4c09209e6cd3f9177a988cc4 Mon Sep 17 00:00:00 2001 From: Jun Chen Date: Mon, 26 Jan 2026 11:27:08 +0100 Subject: [PATCH 1/2] Improve compilation script for cases with dumux --- .../compile-dumux-cases.sh | 21 ++++++++++++------- .../compile-dumux-cases.sh | 20 ++++++++++++------ 2 files changed, 27 insertions(+), 14 deletions(-) diff --git a/free-flow-over-porous-media/compile-dumux-cases.sh b/free-flow-over-porous-media/compile-dumux-cases.sh index d5b0c0908..ec9ea0c9e 100755 --- a/free-flow-over-porous-media/compile-dumux-cases.sh +++ b/free-flow-over-porous-media/compile-dumux-cases.sh @@ -1,15 +1,20 @@ #!/usr/bin/env sh set -e -u -( -cd free-flow-dumux/build-cmake/solver-dumux -make free_flow_dumux -) +# To compile free-flow-dumux and porous-media-dumux from zero or recompile them after changes +./dune-common/bin/dunecontrol --opts=./dumux/cmake.opts --only=free_flow_dumux all +./dune-common/bin/dunecontrol --opts=./dumux/cmake.opts --only=porous_media_dumux all -( -cd porous-media-dumux/build-cmake/solver-dumux -make porous_media_dumux -) +# Alternatively, you can manually recompile free-flow-dumux and porous-media-dumux when the `build-cmake` folder is present by uncommenting the following lines: +# ( +# cd free-flow-dumux/build-cmake/solver-dumux +# make free_flow_dumux +# ) + +# ( +# cd porous-media-dumux/build-cmake/solver-dumux +# make porous_media_dumux +# ) # Move free-flow-dumux and porous-media-dumux executables to the participant folder level mv free-flow-dumux/build-cmake/solver-dumux/free_flow_dumux free-flow-dumux/ diff --git a/two-scale-heat-conduction/compile-dumux-cases.sh b/two-scale-heat-conduction/compile-dumux-cases.sh index d9f1bd20a..bf136231c 100755 --- a/two-scale-heat-conduction/compile-dumux-cases.sh +++ b/two-scale-heat-conduction/compile-dumux-cases.sh @@ -1,12 +1,20 @@ #!/usr/bin/env sh set -e -u -cd macro-dumux/build-cmake/appl -make macro_dumux -cd ../../../micro-dumux/build-cmake/appl -make -cd ../../../ +# To compile macro-dumux and micro-dumux from zero or recompile them after changes +./dune-common/bin/dunecontrol --opts=./dumux/cmake.opts --only=macro_dumux all +./dune-common/bin/dunecontrol --opts=./dumux/cmake.opts --only=micro_sim all + +# Alternatively, you can manually recompile macro-dumux and micro-dumux when the `build-cmake` folder is present by uncommenting the following lines: +# ( +# cd macro-dumux/build-cmake/appl +# make macro_dumux +# ) +# ( +# cd micro-dumux/build-cmake/appl +# make micro_sim +# ) # Move macro-dumux and micro-dumux executables to the participant folder level mv macro-dumux/build-cmake/appl/macro_dumux macro-dumux/ -mv micro-dumux/build-cmake/appl/micro_sim.cpython-310-x86_64-linux-gnu.so micro-dumux/ +mv micro-dumux/build-cmake/appl/micro_sim.cpython-*.so micro-dumux/ From 30876ee99a1576b4857efcb0b7670485d44ddcc6 Mon Sep 17 00:00:00 2001 From: Jun Chen Date: Mon, 26 Jan 2026 12:58:18 +0100 Subject: [PATCH 2/2] Rephrase and add changelog entry --- changelog-entries/701.md | 1 + free-flow-over-porous-media/compile-dumux-cases.sh | 2 +- two-scale-heat-conduction/compile-dumux-cases.sh | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) create mode 100644 changelog-entries/701.md diff --git a/changelog-entries/701.md b/changelog-entries/701.md new file mode 100644 index 000000000..4447a100f --- /dev/null +++ b/changelog-entries/701.md @@ -0,0 +1 @@ +- Changed the compilation script for the tutorials with DuMux solvers to allow the cases to be compiled from scratch into a DUNE module. \ No newline at end of file diff --git a/free-flow-over-porous-media/compile-dumux-cases.sh b/free-flow-over-porous-media/compile-dumux-cases.sh index ec9ea0c9e..c964ef4e4 100755 --- a/free-flow-over-porous-media/compile-dumux-cases.sh +++ b/free-flow-over-porous-media/compile-dumux-cases.sh @@ -1,7 +1,7 @@ #!/usr/bin/env sh set -e -u -# To compile free-flow-dumux and porous-media-dumux from zero or recompile them after changes +# To compile free-flow-dumux and porous-media-dumux from scratch or recompile them after changes ./dune-common/bin/dunecontrol --opts=./dumux/cmake.opts --only=free_flow_dumux all ./dune-common/bin/dunecontrol --opts=./dumux/cmake.opts --only=porous_media_dumux all diff --git a/two-scale-heat-conduction/compile-dumux-cases.sh b/two-scale-heat-conduction/compile-dumux-cases.sh index bf136231c..390b1c437 100755 --- a/two-scale-heat-conduction/compile-dumux-cases.sh +++ b/two-scale-heat-conduction/compile-dumux-cases.sh @@ -1,7 +1,7 @@ #!/usr/bin/env sh set -e -u -# To compile macro-dumux and micro-dumux from zero or recompile them after changes +# To compile macro-dumux and micro-dumux from scratch or recompile them after changes ./dune-common/bin/dunecontrol --opts=./dumux/cmake.opts --only=macro_dumux all ./dune-common/bin/dunecontrol --opts=./dumux/cmake.opts --only=micro_sim all