Skip to content

Commit 1045afd

Browse files
authoredFeb 13, 2022
Release v202202.0.0
Merge Request #29
2 parents b7fccf4 + b9d03ed commit 1045afd

18 files changed

+169
-28
lines changed
 

‎.gitattributes

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
*.so filter=lfs diff=lfs merge=lfs -text
2+
*.tar.gz filter=lfs diff=lfs merge=lfs -text

‎.github/workflows/build.yml

+4
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,16 @@ name: Build and package
22
on:
33
pull_request:
44
types: [ready_for_review]
5+
workflow_dispatch:
6+
57
jobs:
68
vagrant-up:
79
runs-on: macos-10.15
810

911
steps:
1012
- uses: actions/checkout@v2
13+
with:
14+
lfs: true
1115

1216
- name: Cache Vagrant boxes
1317
uses: actions/cache@v2

‎README.md

+6-5
Original file line numberDiff line numberDiff line change
@@ -50,14 +50,15 @@ This box is based on the [bento/ubuntu-20.04](https://github.com/chef/bento/blob
5050
- preCICE latest for the master branch
5151
- preCICE config visualizer (master)
5252
- preCICE Python bindings (PIP)
53-
- OpenFOAM v2012 and the OpenFOAM-preCICE adapter (master)
54-
- deal.II 9.2 from the official backports and the deal.II-preCICE adapter (master)
55-
- CalculiX 2.16 from source and the CalculiX-preCICE adapter (master)
53+
- OpenFOAM v2112 and the OpenFOAM-preCICE adapter (master)
54+
- deal.II 9.3 from the official backports and the deal.II-preCICE adapter (master)
55+
- CalculiX 2.19 from source and the CalculiX-preCICE adapter (master)
5656
- FEniCS latest from the FEniCS PPA and the FEniCS-preCICE adapter (PIP)
5757
- Nutils latest from PIP
5858
- SU2 6.0.0 and the SU2-preCICE adapter (master)
5959
- code_aster 14.6 and the code_aster-preCICE adapter (master)
60-
- Paraview from the official binaries
60+
- DUNE 2.8 and the experimental DUNE-preCICE adapter (master)
61+
- Paraview from APT
6162
- Gnuplot
6263

6364
It then adds to the `/home/vagrant/`:
@@ -87,7 +88,7 @@ In case you killed the session before provisioning finished, the setup of your V
8788

8889
## Testing before publishing
8990

90-
We now have a GitHub action that can build the Vagrant box. This workflow only runs for pull requests that are marked as "ready for review" (i.e. not "draft"), as it takes significant time to complete (~1.5h). If you already submitted a normal PR but the workflow is not triggered, convert the PR to draft and then to "ready for review" again.
91+
We now have a GitHub action that can build the Vagrant box. This workflow only runs for pull requests that are marked as "ready for review" (i.e. not "draft"), as it takes significant time to complete (~1.5h). If you already submitted a normal PR but the workflow is not triggered, you can manually trigger it from the "Actions" tab.
9192

9293
The workflow uploads the resulting box as an artifact and it also prints its SHA256 checksum before that. Download the job artifact and unzip it. Then run add the box to Vagrant:
9394

‎Vagrantfile

+2
Original file line numberDiff line numberDiff line change
@@ -37,12 +37,14 @@ Vagrant.configure("2") do |config|
3737
# Install solvers, adapters, and related tools
3838
config.vm.provision "shell", path: "provisioning/install-config-visualizer.sh", privileged: false
3939
config.vm.provision "shell", path: "provisioning/install-openfoam.sh", privileged: false
40+
config.vm.provision "file", source: "provisioning/prebuilt/swak4Foam/swak4Foam.tar.gz", destination: "~/OpenFOAM/vagrant-v2112/platforms/linux64GccDPInt32Opt/swak4Foam.tar.gz"
4041
config.vm.provision "shell", path: "provisioning/install-dealii.sh", privileged: false
4142
config.vm.provision "shell", path: "provisioning/install-calculix.sh", privileged: false
4243
config.vm.provision "shell", path: "provisioning/install-fenics.sh", privileged: false
4344
config.vm.provision "shell", path: "provisioning/install-nutils.sh", privileged: false
4445
config.vm.provision "shell", path: "provisioning/install-su2.sh", privileged: false
4546
config.vm.provision "shell", path: "provisioning/install-code_aster.sh", privileged: false
47+
config.vm.provision "shell", path: "provisioning/install-dune.sh", privileged: false
4648
config.vm.provision "shell", path: "provisioning/install-paraview.sh", privileged: false
4749

4850
# Post-installation steps

‎provisioning/cleanup.sh

+3
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,6 @@ sudo apt-get clean
66

77
# Cleanup all object files from compilation
88
find "${HOME}" -type f -name '*.o' -exec rm -fv {} \;
9+
10+
# Remove the cache
11+
rm -rfv ~/.cache

‎provisioning/install-basics.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ sudo apt-get upgrade -qy
1111

1212
# Install the Xfce desktop environment and basic applications
1313
sudo apt-get install -y xubuntu-core^
14-
sudo apt-get install -y thunar xfce4-terminal terminator bash-completion tree evince firefox firefox-locale-en
14+
sudo apt-get install -y thunar xfce4-terminal terminator bash-completion tree evince firefox firefox-locale-en baobab catfish
1515

1616
# Install the VirtualBox guest additions
1717
sudo apt-get install -y virtualbox-guest-dkms virtualbox-guest-utils virtualbox-guest-x11

‎provisioning/install-calculix.sh

+4-4
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ set -ex
55
sudo apt-get install -y libarpack2-dev libspooles-dev libyaml-cpp-dev
66

77
# Install CalculiX
8-
wget --quiet http://www.dhondt.de/ccx_2.16.src.tar.bz2
9-
tar xvjf ccx_2.16.src.tar.bz2
10-
rm -fv ccx_2.16.src.tar.bz2
8+
wget --quiet http://www.dhondt.de/ccx_2.19.src.tar.bz2
9+
tar xvjf ccx_2.19.src.tar.bz2
10+
rm -fv ccx_2.19.src.tar.bz2
1111

1212
# Get the CalculiX-preCICE adapter
1313
if [ ! -d "calculix-adapter/" ]; then
@@ -16,7 +16,7 @@ fi
1616
(
1717
cd calculix-adapter
1818
git pull
19-
make -j 2
19+
make -j "$(nproc)"
2020
)
2121

2222
# Add the CalculiX adapter to PATH

‎provisioning/install-code_aster.sh

+5
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,11 @@ fi
2929
ln -sf "${HOME}/code_aster-adapter/cht/adapter.py" .
3030
)
3131

32+
# Remove the code_aster tests to save space (approx. 500MB)
33+
rm -rfv ~/code_aster/14.6/share/aster/tests
34+
# Remove some documentation to save space (~100MB)
35+
rm -rfv ~/code_aster/public/med-4.00/share/doc
36+
3237
# Optional: Update the tutorials exchange directory (needs to be absolute) and generate the export file.
3338
(
3439
cd "${HOME}/tutorials/flow-over-heated-plate-steady-state"

‎provisioning/install-dealii.sh

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
#!/usr/bin/env bash
22
set -ex
33

4-
# Install deal.II from the deal.II 9.2.0 backports PPA
5-
sudo add-apt-repository ppa:ginggs/deal.ii-9.2.0-backports
4+
# Install deal.II from the deal.II 9.3.0 backports PPA
5+
sudo add-apt-repository ppa:ginggs/deal.ii-9.3.0-backports
66
sudo apt-get update
77
sudo apt-get install -y libdeal.ii-dev
88

@@ -13,7 +13,7 @@ fi
1313
(
1414
cd dealii-adapter
1515
git pull
16-
cmake . && make -j 2
16+
cmake . && make -j "$(nproc)"
1717
)
1818

1919
# Add the deal.II adapter to PATH

‎provisioning/install-dune.sh

+72
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
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 ~

‎provisioning/install-nutils.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
set -ex
33

44
# Install Nutils from PIP (we will also need matplotlib in our examples)
5-
pip3 install --user matplotlib nutils
5+
pip3 install --user matplotlib nutils==6.3

‎provisioning/install-openfoam.sh

+25-4
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ set -ex
44
# Add the signing key, add the repository, update:
55
wget -q -O - https://dl.openfoam.com/add-debian-repo.sh | sudo bash
66

7-
# Install OpenFOAM v2012:
8-
sudo apt-get install -y openfoam2012-dev
7+
# Install OpenFOAM v2112:
8+
sudo apt-get install -y openfoam2112-dev
99
# Enable OpenFOAM by default:
10-
echo ". /usr/lib/openfoam/openfoam2012/etc/bashrc" >> ~/.bashrc
10+
echo ". /usr/lib/openfoam/openfoam2112/etc/bashrc" >> ~/.bashrc
1111

1212
# Get the OpenFOAM-preCICE adapter
1313
if [ ! -d "openfoam-adapter/" ]; then
@@ -16,5 +16,26 @@ fi
1616
(
1717
cd openfoam-adapter
1818
git pull
19-
openfoam2012 ./Allwmake
19+
openfoam2112 ./Allwmake
2020
)
21+
22+
# Get swak4Foam (provides groovyBC, needed for the turek-hron-fsi3 tutorial)
23+
#
24+
# # Option 1: Build from source
25+
# sudo apt-get install -y mercurial
26+
# hg clone http://hg.code.sf.net/p/openfoam-extend/swak4Foam swak4Foam
27+
# (
28+
# cd swak4Foam
29+
# hg checkout develop
30+
# openfoam2112 ./AllwmakeAll
31+
# )
32+
#
33+
# # Remove some swak4Foam files to save space (approx. 150MB)
34+
# rm -rfv .~swak4Foam
35+
# sudo apt-get purge --autoremove -y mercurial # This also removes Python2, yipieh!
36+
#
37+
# # Option 2: Use pre-built binaries
38+
# # (see Vagrantfile and post-install.sh, rebuild and update for OpenFOAM version other than v2112)
39+
40+
# Build the tutorials partitioned-heat-conduction solver
41+
cd ~/tutorials/partitioned-heat-conduction/openfoam-solver && openfoam2112 wmake

‎provisioning/install-paraview.sh

+1-8
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,4 @@
11
#!/usr/bin/env bash
22
set -ex
33

4-
if [ ! -d "paraview" ]; then
5-
mkdir paraview
6-
PARAVIEW_URL="https://www.paraview.org/paraview-downloads/download.php?submit=Download&version=v5.8&type=binary&os=Linux&downloadFile=ParaView-5.8.1-MPI-Linux-Python3.7-64bit.tar.gz"
7-
wget --no-check-certificate --quiet -O - "${PARAVIEW_URL}" | tar -xz -C paraview
8-
ln -sf ~/paraview/ParaView-5.8.1-MPI-Linux-Python3.7-64bit/bin/paraview ~/Desktop/
9-
# Add ParaView to PATH
10-
echo "export PATH=\"\${HOME}/paraview/ParaView-5.8.1-MPI-Linux-Python3.7-64bit/bin:\${PATH}\"" >>~/.bashrc
11-
fi
4+
sudo apt-get install -y paraview

‎provisioning/install-precice.sh

+21-1
Original file line numberDiff line numberDiff line change
@@ -15,17 +15,37 @@ fi
1515
git pull
1616
mkdir -p build && cd build/
1717
cmake -DCMAKE_INSTALL_PREFIX=/usr -DBUILD_SHARED_LIBS=ON -DCMAKE_BUILD_TYPE=Debug -DBUILD_TESTING=OFF -Wno-dev ..
18-
make -j 2
18+
make -j "$(nproc)"
1919
rm -fv ./*.deb && make package
2020
sudo apt-get install -y ./libprecice2_*.deb
21+
# Remove generated packages to save space (approx. 70MB)
22+
rm -rfv ./*.deb ./*.tar.gz _CPack_Packages
2123
)
2224

2325
# Collect examples and tutorials
2426
cp -r /usr/share/precice/examples/ ./precice-examples
27+
(
28+
cd precice-examples/solverdummies
29+
cd c && cmake . && make && cd ..
30+
cd cpp && cmake . && make && cd ..
31+
cd fortran && cmake . && make && cd ..
32+
if [ ! -d "fortran-module/" ]; then
33+
git clone --depth=1 --branch master https://github.com/precice/fortran-module.git
34+
fi
35+
cd fortran-module && make
36+
cd examples/solverdummy && make
37+
)
38+
2539
if [ ! -d "tutorials/" ]; then
2640
git clone --depth=1 --branch master https://github.com/precice/tutorials.git
2741
ln -sf ~/tutorials ~/Desktop/
2842
fi
43+
(
44+
cd tutorials/quickstart/solid-cpp/ && cmake . && make
45+
)
46+
(
47+
cd tutorials/heat-exchanger && ./download-meshes.sh
48+
)
2949
sudo apt-get -y install gnuplot # needed for watchpoint scripts of tutorials
3050

3151

‎provisioning/install-su2.sh

+4-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,10 @@ fi
3535
./configure --disable-metis --disable-parmetis --disable-cgns --disable-DOT \
3636
--disable-MSH --disable-DEF --disable-SOL --disable-GEO \
3737
--prefix="${SU2_RUN}" CXXFLAGS='-std=c++11'
38-
make -j 2
38+
make -j "$(nproc)"
3939
# We still need sudo for whatever reason
4040
sudo make install
4141
)
42+
43+
# Remove the libSU2Core.a library to save space (approx. 500MB)
44+
rm -fv ~/SU2-6.0.0/SU2_CFD/obj/libSU2Core.a

‎provisioning/post-install.sh

+10
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,19 @@
11
#!/usr/bin/env bash
22
set -ex
33

4+
# Setup swak4Foam
5+
(
6+
cd "${HOME}/OpenFOAM/vagrant-v2112/platforms/linux64GccDPInt32Opt/"
7+
tar -xzvf swak4Foam.tar.gz
8+
)
9+
410
# Create a link to the default shared folder
511
ln -sf /vagrant/ ~/Desktop/shared
612

13+
# Add terminator on the desktop
14+
cp /usr/share/applications/terminator.desktop ~/Desktop/
15+
chmod +x ~/Desktop/terminator.desktop
16+
717
# Disable the screensaver and automatic screen lock
818
{
919
echo "xset s off -dpms"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Prebuilt libraries and tools of swak4Foam for Ubuntu 20.04 and OpenFOAM v2112, based on commit ea7680cdcf8b (December 2021).
2+
Find the source code on http://hg.code.sf.net/p/openfoam-extend/swak4Foam/rev/ea7680cdcf8b
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
version https://git-lfs.github.com/spec/v1
2+
oid sha256:a6150a56f3670a237e2dbff936a5f99f900d4c71c82fa08bce9dad2795ebfae0
3+
size 19974607

0 commit comments

Comments
 (0)
Please sign in to comment.