-
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add DuMux 3.8 and update DUNE to 2.9.1 (#87)
- Loading branch information
Showing
2 changed files
with
42 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 ~ |