Skip to content

Commit

Permalink
WIP: Add DuMuX
Browse files Browse the repository at this point in the history
  • Loading branch information
MakisH committed Apr 22, 2024
1 parent ab7279e commit 0854655
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 40 deletions.
16 changes: 8 additions & 8 deletions Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -47,18 +47,18 @@ Vagrant.configure("2") do |config|

# Install solvers, adapters, and related tools
config.vm.provision "shell", path: "provisioning/install-config-visualizer.sh", privileged: false
config.vm.provision "shell", path: "provisioning/install-openfoam.sh", privileged: false
config.vm.provision "shell", path: "provisioning/install-dealii.sh", privileged: false
config.vm.provision "shell", path: "provisioning/install-calculix.sh", privileged: false
# config.vm.provision "shell", path: "provisioning/install-openfoam.sh", privileged: false
# config.vm.provision "shell", path: "provisioning/install-dealii.sh", privileged: false
# config.vm.provision "shell", path: "provisioning/install-calculix.sh", privileged: false
config.vm.provision "shell", path: "provisioning/install-fenics.sh", privileged: false
config.vm.provision "shell", path: "provisioning/install-fmiprecice.sh", privileged: false
config.vm.provision "shell", path: "provisioning/install-micro-manager.sh", privileged: false
config.vm.provision "shell", path: "provisioning/install-su2.sh", privileged: false
config.vm.provision "shell", path: "provisioning/install-code_aster.sh", privileged: false
# config.vm.provision "shell", path: "provisioning/install-su2.sh", privileged: false
# config.vm.provision "shell", path: "provisioning/install-code_aster.sh", privileged: false
config.vm.provision "shell", path: "provisioning/install-dune.sh", privileged: false
config.vm.provision "shell", path: "provisioning/install-paraview.sh", privileged: false
config.vm.provision "shell", path: "provisioning/install-julia-bindings.sh", privileged: false
config.vm.provision "shell", path: "provisioning/install-aste.sh", privileged: false
# config.vm.provision "shell", path: "provisioning/install-paraview.sh", privileged: false
# config.vm.provision "shell", path: "provisioning/install-julia-bindings.sh", privileged: false
# config.vm.provision "shell", path: "provisioning/install-aste.sh", privileged: false

# Post-installation steps
config.vm.provision "shell", path: "provisioning/post-install.sh", privileged: false
Expand Down
65 changes: 33 additions & 32 deletions provisioning/install-dune.sh
Original file line number Diff line number Diff line change
@@ -1,72 +1,73 @@
#!/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 (-p to allow re-provisioning)
# mkdir -p dune-dumux && cd dune-dumux

# Get required DUNE modules
if [ ! -d "dune-common/" ]; then
git clone --branch v2.8.0 --depth=1 https://gitlab.dune-project.org/core/dune-common.git
# Get dumux installation script (fixed version, because master might fail)
if [ ! -f "installdumux.py" ]; then
wget https://git.iws.uni-stuttgart.de/dumux-repositories/dumux/-/raw/3.8.0/bin/installdumux.py
fi

if [ ! -d "dune-istl/" ]; then
git clone --branch v2.8.0 --depth=1 https://gitlab.dune-project.org/core/dune-istl.git
fi
# Install dumux and navigate into the respective directory
python3 installdumux.py
cd dumux

if [ ! -d "dune-localfunctions/" ]; then
git clone --branch v2.8.0 --depth=1 https://gitlab.dune-project.org/core/dune-localfunctions.git
# Get the DuMuX-preCICE adapter
if [ ! -d "dumux-adapter" ]; then
git clone --depth 1 --branch v2.0.0 https://github.com/precice/dumux-adapter.git
fi

if [ ! -d "dune-grid/" ]; then
git clone --branch v2.8.0 --depth=1 https://gitlab.dune-project.org/core/dune-grid.git
fi
# Build the DuMuX-preCICE adapter
./dune-common/bin/dunecontrol --only=dumux-precice all

if [ ! -d "dune-geometry/" ]; then
git clone --branch v2.8.0 --depth=1 https://gitlab.dune-project.org/core/dune-geometry.git
# Get additional DUNE modules required for the plain DUNE adapter
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-functions/" ]; then
git clone --branch v2.8.0 --depth=1 https://gitlab.dune-project.org/staging/dune-functions.git
fi

if [ ! -d "dune-uggrid/" ]; then
git clone --branch v2.8.0 --depth=1 https://gitlab.dune-project.org/staging/dune-uggrid.git
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)
# Build all the additional DUNE modules
DUNE_CONTROL_PATH=~/dumux ./dune-common/bin/dunecontrol all

# 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 --branch main --depth 1 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_CONTROL_PATH=~/dumux ./dune-common/bin/dunecontrol all

# Set the DUNE_CONTROL_PATH (DUNE recursively finds modules in this directory)
echo "export DUNE_CONTROL_PATH=\"\${HOME}/dune\"" >> ~/.bashrc
# # Set the DUNE_CONTROL_PATH (DUNE recursively finds modules in this directory)
# echo "export DUNE_CONTROL_PATH=\"\${HOME}/dune\"" >> ~/.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
# # 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

# We are done with DUNE, let's do back home
cd ~

0 comments on commit 0854655

Please sign in to comment.