-
-
Notifications
You must be signed in to change notification settings - Fork 167
Expand file tree
/
Copy pathrun.sh
More file actions
executable file
·29 lines (24 loc) · 805 Bytes
/
Copy pathrun.sh
File metadata and controls
executable file
·29 lines (24 loc) · 805 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#!/usr/bin/env bash
set -e -u
. ../../tools/log.sh
exec > >(tee --append "$LOGFILE") 2>&1
if [ ! -f ../solver-fmi/Oscillator.fmu ]; then
cd ../solver-fmi/fmu
rm -rf build
mkdir build
cd build
# Both FMI_VERSION=3 and FMI_VERSION=2 are supported
cmake -DFMI_TYPE=CS -DFMI_VERSION=3 ..
make
cp ./Oscillator.fmu ../..
cd ../../../mass-left-fmi
fi
if [ ! -v PRECICE_TUTORIALS_NO_VENV ]
then
python3 -m venv .venv
. .venv/bin/activate
pip install -r requirements.txt && pip freeze > pip-installed-packages.log
fi
fmiprecice fmi-settings.json precice-settings.json
python3 ../solver-fmi/calculate-error.py ../mass-left-fmi/fmi-settings.json ../mass-left-fmi/precice-settings.json ../mass-right-fmi/fmi-settings.json ../mass-right-fmi/precice-settings.json Mass-Left
close_log