|
| 1 | +#!/usr/bin/env bash |
| 2 | +set -ex |
| 3 | + |
| 4 | +# Make a folder to collect all DUNE-related code (-p to allow re-provisioning) |
| 5 | +mkdir -p dune && cd dune |
| 6 | + |
| 7 | +# Get required DUNE modules |
| 8 | +if [ ! -d "dune-common/" ]; then |
| 9 | + git clone --branch v2.8.0 --depth=1 https://gitlab.dune-project.org/core/dune-common.git |
| 10 | +fi |
| 11 | + |
| 12 | +if [ ! -d "dune-istl/" ]; then |
| 13 | + git clone --branch v2.8.0 --depth=1 https://gitlab.dune-project.org/core/dune-istl.git |
| 14 | +fi |
| 15 | + |
| 16 | +if [ ! -d "dune-localfunctions/" ]; then |
| 17 | + git clone --branch v2.8.0 --depth=1 https://gitlab.dune-project.org/core/dune-localfunctions.git |
| 18 | +fi |
| 19 | + |
| 20 | +if [ ! -d "dune-grid/" ]; then |
| 21 | + git clone --branch v2.8.0 --depth=1 https://gitlab.dune-project.org/core/dune-grid.git |
| 22 | +fi |
| 23 | + |
| 24 | +if [ ! -d "dune-geometry/" ]; then |
| 25 | + git clone --branch v2.8.0 --depth=1 https://gitlab.dune-project.org/core/dune-geometry.git |
| 26 | +fi |
| 27 | + |
| 28 | +if [ ! -d "dune-functions/" ]; then |
| 29 | + git clone --branch v2.8.0 --depth=1 https://gitlab.dune-project.org/staging/dune-functions.git |
| 30 | +fi |
| 31 | + |
| 32 | +if [ ! -d "dune-uggrid/" ]; then |
| 33 | + git clone --branch v2.8.0 --depth=1 https://gitlab.dune-project.org/staging/dune-uggrid.git |
| 34 | +fi |
| 35 | + |
| 36 | +if [ ! -d "dune-typetree/" ]; then |
| 37 | + git clone --branch v2.8.0 --depth=1 https://gitlab.dune-project.org/staging/dune-typetree.git |
| 38 | +fi |
| 39 | + |
| 40 | +if [ ! -d "dune-foamgrid/" ]; then |
| 41 | + git clone --branch releases/2.8 --depth=1 https://gitlab.dune-project.org/extensions/dune-foamgrid.git |
| 42 | +fi |
| 43 | + |
| 44 | +# Get the dune-elastodynamics module (solid solver) |
| 45 | +if [ ! -d "dune-elastodynamics/" ]; then |
| 46 | + git clone --branch master --depth=1 https://github.com/maxfirmbach/dune-elastodynamics.git |
| 47 | +fi |
| 48 | +( |
| 49 | + cd dune-elastodynamics |
| 50 | + git pull |
| 51 | +) |
| 52 | + |
| 53 | +# Get the DUNE-preCICE adapter |
| 54 | +if [ ! -d "dune-adapter/" ]; then |
| 55 | + git clone --branch main --depth=1 https://github.com/precice/dune-adapter.git |
| 56 | +fi |
| 57 | +( |
| 58 | + cd dune-adapter/dune-precice |
| 59 | + git pull |
| 60 | +) |
| 61 | + |
| 62 | +# Build all the DUNE and DUNE-preCICE related modules |
| 63 | +DUNE_CONTROL_PATH=~/dune ./dune-common/bin/dunecontrol all |
| 64 | + |
| 65 | +# Set the DUNE_CONTROL_PATH (DUNE recursively finds modules in this directory) |
| 66 | +echo "export DUNE_CONTROL_PATH=\"\${HOME}/dune\"" >> ~/.bashrc |
| 67 | + |
| 68 | +# Copy the built example code to the tutorials |
| 69 | +cp ~/dune/dune-adapter/dune-precice-howto/build-cmake/examples/dune-perpendicular-flap ~/tutorials/perpendicular-flap/solid-dune |
| 70 | + |
| 71 | +# We are done with DUNE, let's do back home |
| 72 | +cd ~ |
0 commit comments