Skip to content

Commit 7918d9f

Browse files
authored
Add automatic logging (#479)
1 parent 090f2bd commit 7918d9f

File tree

103 files changed

+593
-148
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

103 files changed

+593
-148
lines changed
Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
1-
#!/bin/sh
1+
#!/bin/bash
22
set -e -u
33

4+
. ../../tools/log.sh
5+
exec > >(tee --append "$LOGFILE") 2>&1
6+
47
cp 0/alpha.water_orig 0/alpha.water
58
blockMesh
69
setFields
7-
touch fluid-openfoam.foam
810

911
../../tools/run-openfoam.sh "$@"
1012
. ../../tools/openfoam-remove-empty-dirs.sh && openfoam_remove_empty_dirs
13+
14+
close_log
Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
1-
#!/bin/sh
1+
#!/bin/bash
22
set -e -u
33

4+
. ../../tools/log.sh
5+
exec > >(tee --append "$LOGFILE") 2>&1
6+
47
ccx_preCICE -i flap -precice-participant Solid
8+
9+
close_log
Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
1-
#!/bin/sh
1+
#!/bin/bash
22
set -e -u
33

4+
. ../../tools/log.sh
5+
exec > >(tee --append "$LOGFILE") 2>&1
6+
47
python3 chemical-reaction-advection-diffusion.py
8+
9+
close_log
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#!/bin/sh
2+
set -e -u
3+
4+
# shellcheck disable=SC1091
5+
. ../tools/cleaning-tools.sh
6+
7+
clean_tutorial .
8+
clean_precice_logs .
9+
rm -fv ./*.log
10+
rm -fv ./*.vtu
11+
Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
1-
#!/bin/sh
1+
#!/bin/bash
22
set -e -u
33

4+
. ../../tools/log.sh
5+
exec > >(tee --append "$LOGFILE") 2>&1
6+
47
python3 fluid.py
8+
9+
close_log
Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
1-
#!/bin/sh
1+
#!/bin/bash
22
set -e -u
33

4+
. ../../tools/log.sh
5+
exec > >(tee --append "$LOGFILE") 2>&1
6+
47
python3 -m venv .venv
58
. .venv/bin/activate
69
pip install -r requirements.txt
710
python3 fluid.py
11+
12+
close_log
Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
1-
#!/bin/sh
1+
#!/bin/bash
22
set -e -u
33

4+
. ../../tools/log.sh
5+
exec > >(tee --append "$LOGFILE") 2>&1
6+
47
blockMesh
5-
touch fluid-openfoam.foam
68

79
../../tools/run-openfoam.sh "$@"
810
. ../../tools/openfoam-remove-empty-dirs.sh && openfoam_remove_empty_dirs
11+
12+
close_log
Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
1-
#!/bin/sh
1+
#!/bin/bash
22
set -e -u
33

4+
. ../../tools/log.sh
5+
exec > >(tee --append "$LOGFILE") 2>&1
6+
47
python3 -m venv .venv
58
. .venv/bin/activate
69
pip install -r requirements.txt
710
python3 transport.py
11+
12+
close_log

elastic-tube-1d/fluid-cpp/clean.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,4 @@ set -e -u
55

66
rm -rvf ./output/*.vtk
77
clean_precice_logs .
8+
clean_case_logs .

elastic-tube-1d/fluid-cpp/run.sh

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,15 @@
1-
#!/bin/sh
1+
#!/bin/bash
22
set -e -u
33

4+
. ../../tools/log.sh
5+
exec > >(tee --append "$LOGFILE") 2>&1
6+
47
if [ ! -d build ]; then
58
mkdir build
69
cmake -S . -B build
710
cmake --build build
811
fi
912

1013
./build/FluidSolver ../precice-config.xml
14+
15+
close_log

0 commit comments

Comments
 (0)