-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy path.testAPI.sh
executable file
·69 lines (66 loc) · 5.75 KB
/
.testAPI.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
#!/usr/bin/env bash
if [ -z "$WM_PROJECT" ]; then
echo "OpenFOAM environment not found, forgot to source the OpenFOAM bashrc?"
exit 1
fi
if [ -z "$1" ]; then
echo "Argument not found. Options: incompressible, compressible, and solid"
exit 1
else
argm="$1"
fi
case $argm in
"v2")
echo "Running incompressible tests"
find */runScript* -type f -exec sed -i '/"primalMinResTol":/c\ "primalMinResTol": 0.9,' {} \;
find */*/runScript* -type f -exec sed -i '/"primalMinResTol":/c\ "primalMinResTol": 0.9,' {} \;
find */*/*/runScript* -type f -exec sed -i '/"primalMinResTol":/c\ "primalMinResTol": 0.9,' {} \;
cd 30N30P_MultiElement_Airfoil && ./preProcessing.sh && python runScript_v2.py --task=runPrimal && cd - || exit 1
cd CRM_Wing && ./preProcessing.sh && python runScript_v2.py --task=runPrimal && cd - || exit 1
cd DPW4_Aircraft && ./preProcessing.sh && python runScript_v2.py --task=runPrimal && cd - || exit 1
cd JBC_Hull && ./preProcessing.sh && python runScript_v2.py --task=runPrimal && cd - || exit 1
cd NACA0012_Airfoil/incompressible && ./preProcessing.sh && python runScript_v2.py --task=runPrimal && cd - || exit 1
cd NACA0012_Airfoil/incompressible && echo y | ./Allclean.sh && sed -i 's/SpalartAllmaras/kOmegaSST/g' constant/turbulenceProperties && ./preProcessing.sh && python runScript_v2.py --task=runPrimal && cd - || exit 1
cd NACA0012_Airfoil/incompressible && echo y | ./Allclean.sh && sed -i 's/kOmegaSST/kEpsilon/g' constant/turbulenceProperties && ./preProcessing.sh && python runScript_v2.py --task=runPrimal && cd - || exit 1
cd NACA0012_Airfoil/incompressible && ./preProcessing.sh && python runScript_v2.py --task=runPrimal && cd - || exit 1
cd NACA0012_Airfoil/subsonic && echo y | ./Allclean.sh && sed -i 's/SpalartAllmaras/kOmegaSST/g' constant/turbulenceProperties && ./preProcessing.sh && python runScript_v2.py --task=runPrimal && cd - || exit 1
cd NACA0012_Airfoil/subsonic && echo y | ./Allclean.sh && sed -i 's/kOmegaSST/kEpsilon/g' constant/turbulenceProperties && ./preProcessing.sh && python runScript_v2.py --task=runPrimal && cd - || exit 1
cd NACA0012_Airfoil/multipoint && ./preProcessing.sh && python runScript_v2.py --task=runPrimal && cd - || exit 1
cd NREL6_Wind_Turbine && ./preProcessing.sh && python runScript_v2.py --task=runPrimal && cd - || exit 1
cd Onera_M6_Wing && ./preProcessing.sh && python runScript_v2.py --task=runPrimal && cd - || exit 1
cd PeriodicHill_FieldInversion && ./preProcessing.sh && python runScript_v2.py --task=runPrimal && cd - || exit 1
cd pitzDaily && ./preProcessing.sh && python runScript_v2.py --task=runPrimal --opt=ipopt && cd - || exit 1
cd PlateHole_Structure && ./preProcessing.sh && python runScript_v2.py --task=runPrimal && cd - || exit 1
cd Prowim_Wing_Propeller && ./preProcessing.sh && python runScript_v2.py --task=runPrimal && cd - || exit 1
cd Rotor37_Compressor && ./preProcessing.sh && python runScript_v2.py --task=runPrimal && cd - || exit 1
cd UBend_Channel && ./preProcessing.sh && python runScript_v2.py --task=runPrimal && cd - || exit 1
cd Ramp/unsteady/train && ./preProcessing.sh && python runScript.py --task=runPrimal && cd - || exit 1
;;
"v3")
echo "Running compressible tests"
find */runScript* -type f -exec sed -i '/"primalMinResTol":/c\ "primalMinResTol": 0.9,' {} \;
find */*/runScript* -type f -exec sed -i '/"primalMinResTol":/c\ "primalMinResTol": 0.9,' {} \;
find */*/*/runScript* -type f -exec sed -i '/"primalMinResTol":/c\ "primalMinResTol": 0.9,' {} \;
cd 30N30P_MultiElement_Airfoil && ./preProcessing.sh && python runScript.py -task=runPrimal && cd - || exit 1
cd ADODG3_Wing && ./preProcessing.sh && python runScript.py -task=runPrimal && cd - || exit 1
cd CRM_Wing && ./preProcessing.sh && python runScript.py -task=runPrimal && cd - || exit 1
cd MACH_Tutorial_Wing && ./preProcessing.sh && python runScript_Aero.py -task=runPrimal && cd - || exit 1
cd MACH_Tutorial_Wing && python runScript_AeroStruct.py -task=runPrimal && cd - || exit 1
cd NACA0012_Airfoil/incompressible && ./preProcessing.sh && python runScript.py -task=runPrimal && cd - || exit 1
cd NACA0012_Airfoil/incompressible && echo y | ./Allclean.sh && sed -i 's/SpalartAllmaras/kOmegaSST/g' constant/turbulenceProperties && ./preProcessing.sh && python runScript.py -task=runPrimal && cd - || exit 1
cd NACA0012_Airfoil/incompressible && echo y | ./Allclean.sh && sed -i 's/kOmegaSST/kEpsilon/g' constant/turbulenceProperties && ./preProcessing.sh && python runScript.py -task=runPrimal && cd - || exit 1
cd NACA0012_Airfoil/incompressible && ./preProcessing.sh && python runScript.py -task=runPrimal && cd - || exit 1
cd NACA0012_Airfoil/subsonic && echo y | ./Allclean.sh && sed -i 's/SpalartAllmaras/kOmegaSST/g' constant/turbulenceProperties && ./preProcessing.sh && python runScript.py -task=runPrimal && cd - || exit 1
cd NACA0012_Airfoil/subsonic && echo y | ./Allclean.sh && sed -i 's/kOmegaSST/kEpsilon/g' constant/turbulenceProperties && ./preProcessing.sh && python runScript.py -task=runPrimal && cd - || exit 1
cd NACA0012_Airfoil/multipoint && ./preProcessing.sh && python runScript.py -task=runPrimal && cd - || exit 1
cd NACA0012_Airfoil/multicase && ./preProcessing.sh && python runScript.py -task=runPrimal && cd - || exit 1
cd PeriodicHill_FieldInversion && ./preProcessing.sh && python runScript.py -task=runPrimal && cd - || exit 1
cd Rotor37_Compressor && ./preProcessing.sh && python runScript.py -task=runPrimal && cd - || exit 1
cd Ramp/steady/train && ./preProcessing.sh && python runScript_FIML.py -task=runPrimal && cd - || exit 1
;;
*)
echo "Argument not valid! Options are: v2, v3"
echo "Example: . .testAPI.sh v2"
exit 1
;;
esac