-
Notifications
You must be signed in to change notification settings - Fork 30
/
errors_analysis.sh
executable file
·198 lines (193 loc) · 11.6 KB
/
errors_analysis.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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
#!/bin/bash
# script automotion for FOODIE's errors analysis
# defaults
clean=0
# schemes enabling flags (1 => enabled, disabled otherwise)
ab=0
abm=0
am=0
bdf=0
euler=0
lf=0
lf_raw=0
lmm_ssp=0
lmm_ssp_vss=0
rk_emd=0
rk_ls=0
rk_ssp=0
function print_usage {
echo
echo "`basename $0`"
echo "script automotion for FOODIE's errors analysis"
echo "Usage: `basename $0` #scheme [-clean]"
echo " -clean clean old analyis results"
echo "Valid scheme switches are:"
echo " -ab adams-bashforth"
echo " -abm adams-bashforth-moulton"
echo " -am adams-moulton"
echo " -bdf backward differentiation formula"
echo " -euler euler"
echo " -lf leapfrog"
echo " -lf_raw leapfrog raw filtered"
echo " -lmm_ssp linear multistep methods SSP"
echo " -lmm_ssp-vss linear multistep methods SSP with Variable Step Size"
echo " -rk_emd embeded RK"
echo " -rk_ls low storage RK"
echo " -rk_ssp TVD RK"
echo " -all all schemes!"
}
#parsing command line
while [ $# -gt 0 ]; do
case "$1" in
"-clean")
clean=1
;;
"-ab")
ab=1
;;
"-abm")
abm=1
;;
"-am")
am=1
;;
"-bdf")
bdf=1
;;
"-euler")
euler=1
;;
"-lf")
lf=1
;;
"-lf_raw")
lf_raw=1
;;
"-lmm_ssp")
lmm_ssp=1
;;
"-lmm_ssp-vss")
lmm_ssp_vss=1
;;
"-rk_emd")
rk_emd=1
;;
"-rk_ls")
rk_ls=1
;;
"-rk_ssp")
rk_ssp=1
;;
"-all")
ab=1
abm=1
am=1
bdf=1
euler=1
lf=1
lf_raw=1
lmm_ssp=1
lmm_ssp_vss=1
rk_emd=1
rk_ls=1
rk_ssp=1
;;
*)
echo; echo "Unknown switch $1"; print_usage; exit 1
;;
esac
shift
done
echo "Building tests executables"
date > builds.log
cd ../../../
FoBiS.py build -f src/tests/accuracy/oscillation/fobos -mode errors-analysis --build_dir papers/announcement/errors_analysis/tests >> papers/announcement/errors_analysis/builds.log
cd -
echo "Oscillation test errors analysis"
if [ $clean -eq 1 ] ; then
rm -rf results-oscillation
fi
mkdir -p results-oscillation
cd results-oscillation
if [ $ab -eq 1 ] ; then
../tests/oscillation -r -tf 1e6 --scheme adams_bashforth_1 -Dt 5000.d0 2500.d0 1250.d0 625.d0 320.d0 100.d0 --errors_analysis > analysis_adams_bashforth.log
../tests/oscillation -r -tf 1e6 --scheme adams_bashforth_2 -Dt 5000.d0 2500.d0 1250.d0 625.d0 320.d0 100.d0 --errors_analysis >> analysis_adams_bashforth.log
../tests/oscillation -r -tf 1e6 --scheme adams_bashforth_3 -Dt 5000.d0 2500.d0 1250.d0 625.d0 320.d0 100.d0 --errors_analysis >> analysis_adams_bashforth.log
../tests/oscillation -r -tf 1e6 --scheme adams_bashforth_4 -Dt 5000.d0 2500.d0 1250.d0 625.d0 320.d0 100.d0 --errors_analysis >> analysis_adams_bashforth.log
../tests/oscillation -r -tf 1e6 --scheme adams_bashforth_5 -Dt 1250.d0 625.d0 320.d0 100.d0 --errors_analysis >> analysis_adams_bashforth.log
../tests/oscillation -r -tf 1e6 --scheme adams_bashforth_6 -Dt 1250.d0 625.d0 320.d0 100.d0 --errors_analysis >> analysis_adams_bashforth.log
../tests/oscillation -r -tf 1e5 --scheme adams_bashforth_7 -Dt 10.d0 5.d0 1.d0 --errors_analysis >> analysis_adams_bashforth.log
../tests/oscillation -r -tf 1e4 --scheme adams_bashforth_8 -Dt 1.d0 0.5d0 0.1d0 --errors_analysis >> analysis_adams_bashforth.log
fi
if [ $abm -eq 1 ] ; then
../tests/oscillation -r -tf 1e6 --scheme adams_bashforth_moulton_1 -Dt 5000.d0 2500.d0 1250.d0 625.d0 320.d0 100.d0 --errors_analysis > analysis_adams_bashforth_moulton.log
../tests/oscillation -r -tf 1e6 --scheme adams_bashforth_moulton_2 -Dt 5000.d0 2500.d0 1250.d0 625.d0 320.d0 100.d0 --errors_analysis >> analysis_adams_bashforth_moulton.log
../tests/oscillation -r -tf 1e6 --scheme adams_bashforth_moulton_3 -Dt 5000.d0 2500.d0 1250.d0 625.d0 320.d0 100.d0 --errors_analysis >> analysis_adams_bashforth_moulton.log
../tests/oscillation -r -tf 1e6 --scheme adams_bashforth_moulton_4 -Dt 5000.d0 2500.d0 1250.d0 625.d0 320.d0 100.d0 --errors_analysis >> analysis_adams_bashforth_moulton.log
../tests/oscillation -r -tf 1e6 --scheme adams_bashforth_moulton_5 -Dt 1250.d0 625.d0 320.d0 100.d0 --errors_analysis >> analysis_adams_bashforth_moulton.log
../tests/oscillation -r -tf 1e6 --scheme adams_bashforth_moulton_6 -Dt 1250.d0 625.d0 320.d0 100.d0 --errors_analysis >> analysis_adams_bashforth_moulton.log
../tests/oscillation -r -tf 1e6 --scheme adams_bashforth_moulton_7 -Dt 400.d0 250.d0 200.d0 --errors_analysis >> analysis_adams_bashforth_moulton.log
../tests/oscillation -r -tf 1e6 --scheme adams_bashforth_moulton_8 -Dt 250.d0 200.d0 100.d0 --errors_analysis >> analysis_adams_bashforth_moulton.log
fi
if [ $am -eq 1 ] ; then
../tests/oscillation -r -tf 1e6 --scheme adams_moulton_1 -Dt 5000.d0 2500.d0 1250.d0 625.d0 320.d0 100.d0 --errors_analysis > analysis_adams_moulton.log
../tests/oscillation -r -tf 1e6 --scheme adams_moulton_2 -Dt 5000.d0 2500.d0 1250.d0 625.d0 320.d0 100.d0 --errors_analysis >> analysis_adams_moulton.log
../tests/oscillation -r -tf 1e6 --scheme adams_moulton_3 -Dt 5000.d0 2500.d0 1250.d0 625.d0 320.d0 100.d0 --errors_analysis >> analysis_adams_moulton.log
../tests/oscillation -r -tf 1e6 --scheme adams_moulton_4 -Dt 5000.d0 2500.d0 1250.d0 625.d0 320.d0 100.d0 --errors_analysis >> analysis_adams_moulton.log
../tests/oscillation -r -tf 1e6 --scheme adams_moulton_5 -Dt 1250.d0 625.d0 320.d0 100.d0 --errors_analysis >> analysis_adams_moulton.log
../tests/oscillation -r -tf 1e6 --scheme adams_moulton_6 -Dt 1250.d0 625.d0 320.d0 100.d0 --errors_analysis >> analysis_adams_moulton.log
../tests/oscillation -r -tf 1e6 --scheme adams_moulton_7 -Dt 400.d0 250.d0 200.d0 --errors_analysis >> analysis_adams_moulton.log
../tests/oscillation -r -tf 1e6 --scheme adams_moulton_8 -Dt 250.d0 200.d0 100.d0 --errors_analysis >> analysis_adams_moulton.log
fi
if [ $bdf -eq 1 ] ; then
../tests/oscillation -r -tf 1e6 --scheme back_df_1 -Dt 5000.d0 2500.d0 1250.d0 625.d0 320.d0 100.d0 --errors_analysis > analysis_back_df.log
../tests/oscillation -r -tf 1e6 --scheme back_df_2 -Dt 5000.d0 2500.d0 1250.d0 625.d0 320.d0 100.d0 --errors_analysis >> analysis_back_df.log
../tests/oscillation -r -tf 1e6 --scheme back_df_3 -Dt 5000.d0 2500.d0 1250.d0 625.d0 320.d0 100.d0 --errors_analysis >> analysis_back_df.log
../tests/oscillation -r -tf 1e6 --scheme back_df_4 -Dt 5000.d0 2500.d0 1250.d0 625.d0 320.d0 100.d0 --errors_analysis >> analysis_back_df.log
../tests/oscillation -r -tf 1e6 --scheme back_df_5 -Dt 5000.d0 2500.d0 1250.d0 625.d0 320.d0 100.d0 --errors_analysis >> analysis_back_df.log
../tests/oscillation -r -tf 1e6 --scheme back_df_6 -Dt 5000.d0 2500.d0 1250.d0 625.d0 320.d0 100.d0 --errors_analysis >> analysis_back_df.log
fi
if [ $euler -eq 1 ] ; then
../tests/oscillation -r -tf 1e6 --scheme euler_explicit -Dt 5000.d0 2500.d0 1250.d0 625.d0 320.d0 100.d0 --errors_analysis > analysis_euler_explicit.log
fi
if [ $lf -eq 1 ] ; then
../tests/oscillation -r -tf 1e6 --scheme leapfrog -Dt 5000.d0 2500.d0 1250.d0 625.d0 320.d0 100.d0 --errors_analysis > analysis_leapfrog.log
fi
if [ $lf_raw -eq 1 ] ; then
../tests/oscillation -r -tf 1e6 --scheme leapfrog_raw -Dt 5000.d0 2500.d0 1250.d0 625.d0 320.d0 100.d0 --errors_analysis > analysis_leapfrog_raw.log
fi
if [ $lmm_ssp -eq 1 ] ; then
../tests/oscillation -r -tf 1e6 --scheme lmm_ssp_steps_3_order_2 -Dt 5000.d0 2500.d0 1250.d0 625.d0 320.d0 100.d0 50.d0 10.d0 --errors_analysis > analysis_lmm_ssp.log
../tests/oscillation -r -tf 1e6 --scheme lmm_ssp_steps_4_order_3 -Dt 5000.d0 2500.d0 1250.d0 625.d0 320.d0 100.d0 50.d0 10.d0 --errors_analysis >> analysis_lmm_ssp.log
../tests/oscillation -r -tf 1e6 --scheme lmm_ssp_steps_5_order_3 -Dt 5000.d0 2500.d0 1250.d0 625.d0 320.d0 100.d0 50.d0 10.d0 --errors_analysis >> analysis_lmm_ssp.log
fi
if [ $lmm_ssp_vss -eq 1 ] ; then
../tests/oscillation -r -tf 1e6 --scheme lmm_ssp_vss_steps_2_order_2 -Dt 5000.d0 2500.d0 1250.d0 625.d0 320.d0 100.d0 50.d0 10.d0 --errors_analysis > analysis_lmm_ssp_vss.log
../tests/oscillation -r -tf 1e6 --scheme lmm_ssp_vss_steps_3_order_2 -Dt 5000.d0 2500.d0 1250.d0 625.d0 320.d0 100.d0 50.d0 10.d0 --errors_analysis >> analysis_lmm_ssp_vss.log
../tests/oscillation -r -tf 1e6 --scheme lmm_ssp_vss_steps_3_order_3 -Dt 5000.d0 2500.d0 1250.d0 625.d0 320.d0 100.d0 50.d0 10.d0 --errors_analysis >> analysis_lmm_ssp_vss.log
../tests/oscillation -r -tf 1e6 --scheme lmm_ssp_vss_steps_4_order_3 -Dt 5000.d0 2500.d0 1250.d0 625.d0 320.d0 100.d0 50.d0 10.d0 --errors_analysis >> analysis_lmm_ssp_vss.log
../tests/oscillation -r -tf 1e6 --scheme lmm_ssp_vss_steps_5_order_3 -Dt 5000.d0 2500.d0 1250.d0 625.d0 320.d0 100.d0 50.d0 10.d0 --errors_analysis >> analysis_lmm_ssp_vss.log
fi
if [ $rk_emd -eq 1 ] ; then
../tests/oscillation -r -tf 1e6 --scheme runge_kutta_emd_stages_6_order_5 --tolerance 1e-8 1e-9 --errors_analysis > analysis_runge_kutta_emd.log
../tests/oscillation -r -tf 1e6 --scheme runge_kutta_emd_stages_7_order_4 --tolerance 1e-8 1e-9 --errors_analysis >> analysis_runge_kutta_emd.log
../tests/oscillation -r -tf 1e6 --scheme runge_kutta_emd_stages_9_order_6 --tolerance 1e-8 1e-9 --errors_analysis >> analysis_runge_kutta_emd.log
../tests/oscillation -r -tf 1e6 --scheme runge_kutta_emd_stages_17_order_10 --tolerance 1e-8 1e-9 --errors_analysis >> analysis_runge_kutta_emd.log
fi
if [ $rk_ls -eq 1 ] ; then
../tests/oscillation -r -tf 1e6 --scheme runge_kutta_ls_stages_1_order_1 -Dt 5000.d0 2500.d0 1250.d0 625.d0 320.d0 100.d0 --errors_analysis > analysis_runge_kutta_ls.log
../tests/oscillation -r -tf 1e6 --scheme runge_kutta_ls_stages_5_order_4 -Dt 5000.d0 2500.d0 1250.d0 625.d0 320.d0 100.d0 --errors_analysis >> analysis_runge_kutta_ls.log
../tests/oscillation -r -tf 1e6 --scheme runge_kutta_ls_stages_6_order_4 -Dt 5000.d0 2500.d0 1250.d0 625.d0 320.d0 100.d0 --errors_analysis >> analysis_runge_kutta_ls.log
../tests/oscillation -r -tf 1e6 --scheme runge_kutta_ls_stages_7_order_4 -Dt 5000.d0 2500.d0 1250.d0 625.d0 320.d0 100.d0 --errors_analysis >> analysis_runge_kutta_ls.log
../tests/oscillation -r -tf 1e6 --scheme runge_kutta_ls_stages_12_order_4 -Dt 5000.d0 2500.d0 1250.d0 625.d0 320.d0 100.d0 --errors_analysis >> analysis_runge_kutta_ls.log
../tests/oscillation -r -tf 1e6 --scheme runge_kutta_ls_stages_13_order_4 -Dt 5000.d0 2500.d0 1250.d0 625.d0 320.d0 100.d0 --errors_analysis >> analysis_runge_kutta_ls.log
../tests/oscillation -r -tf 1e6 --scheme runge_kutta_ls_stages_14_order_4 -Dt 5000.d0 2500.d0 1250.d0 625.d0 320.d0 100.d0 --errors_analysis >> analysis_runge_kutta_ls.log
fi
if [ $rk_ssp -eq 1 ] ; then
../tests/oscillation -r -tf 1e6 --scheme runge_kutta_ssp_stages_1_order_1 -Dt 5000.d0 2500.d0 1250.d0 625.d0 320.d0 100.d0 --errors_analysis > analysis_runge_kutta_ssp.log
../tests/oscillation -r -tf 1e6 --scheme runge_kutta_ssp_stages_2_order_2 -Dt 5000.d0 2500.d0 1250.d0 625.d0 320.d0 100.d0 --errors_analysis >> analysis_runge_kutta_ssp.log
../tests/oscillation -r -tf 1e6 --scheme runge_kutta_ssp_stages_3_order_3 -Dt 5000.d0 2500.d0 1250.d0 625.d0 320.d0 100.d0 --errors_analysis >> analysis_runge_kutta_ssp.log
../tests/oscillation -r -tf 1e6 --scheme runge_kutta_ssp_stages_5_order_4 -Dt 5000.d0 2500.d0 1250.d0 625.d0 320.d0 100.d0 --errors_analysis >> analysis_runge_kutta_ssp.log
fi
cd -
exit 0