From de16019a5e375dae3818be48210fe8ba90474501 Mon Sep 17 00:00:00 2001 From: Gerasimos Chourdakis Date: Tue, 23 Apr 2024 17:13:04 +0200 Subject: [PATCH] Add DuMux 3.8 and update DUNE to 2.9.1 (#87) --- README.md | 3 +- provisioning/install-dune.sh | 63 +++++++++++++++++++++++------------- 2 files changed, 42 insertions(+), 24 deletions(-) diff --git a/README.md b/README.md index 0669516..a52559f 100644 --- a/README.md +++ b/README.md @@ -61,7 +61,8 @@ This box is based on the ~~[generic/ubuntu2004](https://github.com/lavabit/robox - FEniCS latest from the FEniCS PPA and the FEniCS-preCICE adapter (PIP) - SU2 7.5.1 and the SU2-preCICE adapter (master) - code_aster 14.6 and the code_aster-preCICE adapter (master) -- DUNE 2.8 and the experimental DUNE-preCICE adapter (master) +- DUNE 2.9.1 and the experimental DUNE-preCICE adapter (main) +- DuMuX 3.8 and the DuMuX-preCICE adapter (v2.0.0) - ASTE (master) - Paraview from APT - Gnuplot diff --git a/provisioning/install-dune.sh b/provisioning/install-dune.sh index 432ca9c..2507ae5 100755 --- a/provisioning/install-dune.sh +++ b/provisioning/install-dune.sh @@ -1,72 +1,89 @@ #!/usr/bin/env bash set -ex -# Make a folder to collect all DUNE-related code (-p to allow re-provisioning) -mkdir -p dune && cd dune +# Make a folder to collect all DUNE-related code +mkdir -p dune-dumux && cd dune-dumux -# Get required DUNE modules +# Modules used by DUNE and DuMux +# While the installdumux.py script clones these as well, +# we explicitly clone them to control the versions. if [ ! -d "dune-common/" ]; then - git clone --branch v2.8.0 --depth=1 https://gitlab.dune-project.org/core/dune-common.git + git clone --depth 1 --branch v2.9.1 https://gitlab.dune-project.org/core/dune-common.git fi if [ ! -d "dune-istl/" ]; then - git clone --branch v2.8.0 --depth=1 https://gitlab.dune-project.org/core/dune-istl.git + git clone --depth 1 --branch v2.9.1 https://gitlab.dune-project.org/core/dune-istl.git fi if [ ! -d "dune-localfunctions/" ]; then - git clone --branch v2.8.0 --depth=1 https://gitlab.dune-project.org/core/dune-localfunctions.git + git clone --depth 1 --branch v2.9.1 https://gitlab.dune-project.org/core/dune-localfunctions.git fi if [ ! -d "dune-grid/" ]; then - git clone --branch v2.8.0 --depth=1 https://gitlab.dune-project.org/core/dune-grid.git + git clone --depth 1 --branch v2.9.1 https://gitlab.dune-project.org/core/dune-grid.git fi if [ ! -d "dune-geometry/" ]; then - git clone --branch v2.8.0 --depth=1 https://gitlab.dune-project.org/core/dune-geometry.git + git clone --depth 1 --branch v2.9.1 https://gitlab.dune-project.org/core/dune-geometry.git fi -if [ ! -d "dune-functions/" ]; then - git clone --branch v2.8.0 --depth=1 https://gitlab.dune-project.org/staging/dune-functions.git +if [ ! -d "dune-foamgrid/" ]; then + # The missing v in the tag in this module originates from the project itself + git clone --depth 1 --branch 2.9.1 https://gitlab.dune-project.org/extensions/dune-foamgrid.git fi -if [ ! -d "dune-uggrid/" ]; then - git clone --branch v2.8.0 --depth=1 https://gitlab.dune-project.org/staging/dune-uggrid.git +if [ ! -d "dune-functions/" ]; then + git clone --depth 1 --branch v2.9.1 https://gitlab.dune-project.org/staging/dune-functions.git fi if [ ! -d "dune-typetree/" ]; then - git clone --branch v2.8.0 --depth=1 https://gitlab.dune-project.org/staging/dune-typetree.git + git clone --depth 1 --branch v2.9.1 https://gitlab.dune-project.org/staging/dune-typetree.git fi -if [ ! -d "dune-foamgrid/" ]; then - git clone --branch releases/2.8 --depth=1 https://gitlab.dune-project.org/extensions/dune-foamgrid.git +if [ ! -d "dune-uggrid/" ]; then + git clone --depth 1 --branch v2.9.1 https://gitlab.dune-project.org/staging/dune-uggrid.git fi -# Get the dune-elastodynamics module (solid solver) +# Get the dune-elastodynamics module (solid solver for the plain dune adapter) if [ ! -d "dune-elastodynamics/" ]; then - git clone --branch master --depth=1 https://github.com/maxfirmbach/dune-elastodynamics.git + git clone --depth 1 --branch master https://github.com/maxfirmbach/dune-elastodynamics.git fi ( cd dune-elastodynamics git pull ) -# Get the DUNE-preCICE adapter +# Get the plain DUNE-preCICE adapter if [ ! -d "dune-adapter/" ]; then - git clone --branch main --depth=1 https://github.com/precice/dune-adapter.git + git clone --depth 1 --branch main https://github.com/precice/dune-adapter.git fi ( cd dune-adapter/dune-precice git pull ) -# Build all the DUNE and DUNE-preCICE related modules -DUNE_CONTROL_PATH=~/dune ./dune-common/bin/dunecontrol all +./dune-common/bin/dunecontrol all + +# Get DuMux and the DuMux-preCICE adapter +if [ ! -d "dumux/" ]; then + git clone --depth 1 --branch releases/3.8 https://git.iws.uni-stuttgart.de/dumux-repositories/dumux.git +fi + +# Build DuMux +CMAKE_FLAGS="$CMAKE_FLAGS -DCMAKE_DISABLE_FIND_PACKAGE_Kokkos=TRUE" ./dune-common/bin/dunecontrol --only=dumux all + +if [ ! -d "dumux-adapter/" ]; then + git clone --depth 1 --branch v2.0.0 https://github.com/precice/dumux-adapter.git +fi + +# Build the DuMux-preCICE adapter +CMAKE_FLAGS="$CMAKE_FLAGS -DCMAKE_DISABLE_FIND_PACKAGE_Kokkos=TRUE" ./dune-common/bin/dunecontrol --only=dumux-precice all # Set the DUNE_CONTROL_PATH (DUNE recursively finds modules in this directory) -echo "export DUNE_CONTROL_PATH=\"\${HOME}/dune\"" >> ~/.bashrc +echo "export DUNE_CONTROL_PATH=\"\${HOME}/dune-dumux\"" >> ~/.bashrc # Copy the built example code to the tutorials -cp ~/dune/dune-adapter/dune-precice-howto/build-cmake/examples/dune-perpendicular-flap ~/tutorials/perpendicular-flap/solid-dune +cp ~/dune-dumux/dune-adapter/dune-precice-howto/build-cmake/examples/dune-perpendicular-flap ~/tutorials/perpendicular-flap/solid-dune # We are done with DUNE, let's do back home cd ~