Skip to content

Commit

Permalink
Add DuMux 3.8 and update DUNE to 2.9.1 (#87)
Browse files Browse the repository at this point in the history
  • Loading branch information
MakisH authored Apr 23, 2024
1 parent ab7279e commit de16019
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 24 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
63 changes: 40 additions & 23 deletions provisioning/install-dune.sh
Original file line number Diff line number Diff line change
@@ -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 ~

0 comments on commit de16019

Please sign in to comment.