forked from MahdiNabil/CFD-PC
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathVVscript_01.sh
executable file
·80 lines (66 loc) · 1.66 KB
/
VVscript_01.sh
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
#!/bin/bash
# Continuous integration + validation code for interThermalPhaseChangeFoam
#Initialize a summary log file for all the operations
rm -rf CFD-PC
rm Summary.log
rm errors.log
touch Summary.log
SummaryFile=`readlink -f Summary.log`
touch errors.log
# First check, clone the case
git clone https://github.com/MahdiNabil/CFD-PC.git 2> errors.log
#Check if successful
FATAL_ERROR=`grep fatal errors.log`
if [ -n "$FATAL_ERROR" ]
then
MSG="Clone repository check: FAIL"
echo $MSG
echo $MSG >> $SummaryFile
exit
else
MSG="Clone repository check: PASS"
echo $MSG
echo $MSG >> $SummaryFile
fi
# Next, do the build check
cd CFD-PC/interThermalPhaseFoam
touch errors.log
export WM_NCOMPPROCS=12
./Allwmake.sh 2> errors.log 1> compile.log
#Check if successful
FATAL_ERROR=`grep Error errors.log`
if [ -n "$FATAL_ERROR" ]
then
MSG="Build master branch check: FAIL"
echo $MSG
echo $MSG >> $SummaryFile
exit
else
MSG="Build master branch check: PASS"
echo $MSG
echo $MSG >> $SummaryFile
fi
cat $SummaryFile | mail -s "test" mtfelab@gmail.com
# To validate with the stefan case
#stefan=CFD-PC/interThermalPhaseFoam/tutorials/Stefan
#cd ../..
#mkdir validationFiles
#mv $stefan/LiquidAccumulation.dat validationFiles/./
#cd $stefan
#./Allclean
#./InitStep
#sleep 2m
#killall interThermalPhaseChangeFoam
# To validate with the NusseltSmooth case
# Check the datafile generated with the analytical solution
NusseltSmooth=CFD-PC/interThermalPhaseFoam/tutorials/NusseltSmooth
cd ../..
mkdir validationFiles
cd $NusseltSmooth
./cleanup.sh
./InitScript.sh
sleep 2m
killall interThermalPhaseChangeFoam
mv WallHeatFlux.dat validationFiles/./
octave
run "CheckNusselt.m"