Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add DuMux 3.8 and update to DUNE 2.9.1 #87

Merged
merged 21 commits into from
Apr 23, 2024
Merged
Show file tree
Hide file tree
Changes from 19 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 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
./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 ~
Loading