Skip to content

Commit 8b99412

Browse files
authored
Improve compilation script for cases with DuMux (#701)
Allow to compile the DuMux solvers from scratch against other DUNE-modules.
1 parent 47a4396 commit 8b99412

File tree

3 files changed

+28
-14
lines changed

3 files changed

+28
-14
lines changed

changelog-entries/701.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
- Changed the compilation script for the tutorials with DuMux solvers to allow the cases to be compiled from scratch into a DUNE module.

free-flow-over-porous-media/compile-dumux-cases.sh

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,20 @@
11
#!/usr/bin/env sh
22
set -e -u
33

4-
(
5-
cd free-flow-dumux/build-cmake/solver-dumux
6-
make free_flow_dumux
7-
)
4+
# To compile free-flow-dumux and porous-media-dumux from scratch or recompile them after changes
5+
./dune-common/bin/dunecontrol --opts=./dumux/cmake.opts --only=free_flow_dumux all
6+
./dune-common/bin/dunecontrol --opts=./dumux/cmake.opts --only=porous_media_dumux all
87

9-
(
10-
cd porous-media-dumux/build-cmake/solver-dumux
11-
make porous_media_dumux
12-
)
8+
# Alternatively, you can manually recompile free-flow-dumux and porous-media-dumux when the `build-cmake` folder is present by uncommenting the following lines:
9+
# (
10+
# cd free-flow-dumux/build-cmake/solver-dumux
11+
# make free_flow_dumux
12+
# )
13+
14+
# (
15+
# cd porous-media-dumux/build-cmake/solver-dumux
16+
# make porous_media_dumux
17+
# )
1318

1419
# Move free-flow-dumux and porous-media-dumux executables to the participant folder level
1520
mv free-flow-dumux/build-cmake/solver-dumux/free_flow_dumux free-flow-dumux/
Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,20 @@
11
#!/usr/bin/env sh
22
set -e -u
33

4-
cd macro-dumux/build-cmake/appl
5-
make macro_dumux
6-
cd ../../../micro-dumux/build-cmake/appl
7-
make
8-
cd ../../../
4+
# To compile macro-dumux and micro-dumux from scratch or recompile them after changes
5+
./dune-common/bin/dunecontrol --opts=./dumux/cmake.opts --only=macro_dumux all
6+
./dune-common/bin/dunecontrol --opts=./dumux/cmake.opts --only=micro_sim all
7+
8+
# Alternatively, you can manually recompile macro-dumux and micro-dumux when the `build-cmake` folder is present by uncommenting the following lines:
9+
# (
10+
# cd macro-dumux/build-cmake/appl
11+
# make macro_dumux
12+
# )
13+
# (
14+
# cd micro-dumux/build-cmake/appl
15+
# make micro_sim
16+
# )
917

1018
# Move macro-dumux and micro-dumux executables to the participant folder level
1119
mv macro-dumux/build-cmake/appl/macro_dumux macro-dumux/
12-
mv micro-dumux/build-cmake/appl/micro_sim.cpython-310-x86_64-linux-gnu.so micro-dumux/
20+
mv micro-dumux/build-cmake/appl/micro_sim.cpython-*.so micro-dumux/

0 commit comments

Comments
 (0)