v0.10.0
adaptivity_droplet.sh
Go to the documentation of this file.
1 #!/bin/sh
2 BEST_NB_PRC="8"
3 # " chmod +x FILE_NAME " before run the bach script
4 # DIR_NAME="error_mesh_file"
5 NB_PROC="8"
6 ERROR_TYPE="l2" #change the error type here to h1
7 WAVE_NUMBER="0"
8 ODISP="1"
9 # ORDER="adaptivity"
10 ADAPTIVITY="true"
11 
12 # for WAVE_NUMBER in {3,5,10}
13 # do
14 partition="false"
15 DUFFY="true"
16 LOBATTO="true"
17 ERRORLV="0"
18 PRIORI_TYPE="1"
19 # file1="impinging_droplet_$ODISP.cub"
20 # file2="analytical_solution.h5m"
21 #ERROR_TYPE="h1"
22 
23 # BIN_PATH="@CMAKE_CURRENT_BINARY_DIR@"
24 # SRC_PATH="@CMAKE_CURRENT_SOURCE_DIR@"
25 # BIN_PATH="./"
26 # SRC_PATH="./src"
27 
28 # MPIRUN="mpirun -np $NB_PROC"
29 
30 # cd $BIN_PATH
31 
32 
33 
34 # echo LOG: plane wave guide P convergence test
35 # echo | tee -a wave_guide_p.txt
36 # echo "Start p convergence test for plane wave guide ..." | tee -a wave_guide_p.txt
37 # $MPIRUN $BIN_PATH/best_approximation \
38 # -my_file plane_wave_cube.cub \
39 # -my_is_partitioned false \
40 # -wave_number $WAVE_NUMBER \
41 # -wave_direction 0.7071,0.7071,0 \
42 # -analytical_solution_type plane_wave \
43 # -save_postproc_mesh false \
44 # -ksp_type fgmres \
45 # -pc_type lu \
46 # -pc_factor_mat_solver_package mumps \
47 # -ksp_monitor \
48 # -my_order 7 \
49 # -my_max_post_proc_ref_level 0 \
50 # -add_incident_wave false \
51 # -wave_guide_angle 45
52 #
53 # for ODISP in {1..3..1};
54 # do
55 # let NB_PROC=${ODISP}+1
56 # #echo $NB_PROC
57 # #BEGIN analytical solution
58 # # $MPIRUN $BIN_PATH/best_approximation \
59 # # -my_file plane_wave_cube.cub \
60 # # -my_is_partitioned false \
61 # # -wave_number $WAVE_NUMBER \
62 # # -wave_direction 0.7071,0.7071,0 \
63 # # -analytical_solution_type plane_wave \
64 # # -save_postproc_mesh false \
65 # # -ksp_type fgmres \
66 # # -pc_type lu \
67 # # -pc_factor_mat_solver_package mumps \
68 # # -ksp_monitor \
69 # # -my_order $ODISP \
70 # # -my_max_post_proc_ref_level 0 \
71 # # -add_incident_wave false \
72 # # -wave_guide_angle 45
73 #
74 # #BEGIN numerical solution
75 # $MPIRUN $BIN_PATH/fe_approximation \
76 # -my_file analytical_solution.h5m \
77 # -my_is_partitioned false \
78 # -wave_number $WAVE_NUMBER \
79 # -wave_direction 0.7071,0.7071,0 \
80 # -analytical_solution_type plane_wave \
81 # -save_postproc_mesh false \
82 # -ksp_type fgmres \
83 # -pc_type lu \
84 # -pc_factor_mat_solver_package mumps \
85 # -ksp_monitor \
86 # -my_order $ODISP \
87 # -my_max_post_proc_ref_level 0 \
88 # -add_incident_wave false \
89 # -wave_guide_angle 45 |
90 # grep --line-buffered -i "Problem ACOUSTIC_PROBLEM Nb. rows\|Time =" | tee -a -i wave_guide_p.txt
91 # #BEGIN error calculation
92 #
93 # $MPIRUN $BIN_PATH/error_norm \
94 # -my_file $BIN_PATH/fe_solution.h5m \
95 # -norm_type $ERROR_TYPE \
96 # -relative_error false \
97 # -ksp_type fgmres \
98 # -pc_type lu \
99 # -pc_factor_mat_solver_package mumps \
100 # -ksp_monitor \
101 # -my_order 1 \
102 # -my_max_post_proc_ref_level 0 \
103 # -save_postproc_mesh true \
104 # 2>&1 | grep --line-buffered -i " $ERROR_TYPE realtive error " | tee -a -i wave_guide_p.txt
105 # #RENAME files inot their order and wave number.
106 # mbconvert norm_error.h5m norm_error.vtk
107 # mv norm_error.vtk norm_error_k${WAVE_NUMBER}_order_${ODISP}.vtk
108 # done
109 #
110 # #SAVE the results to different directory
111 # mkdir ${DIR_NAME}_${ERROR_TYPE}_waveguide | mv norm_error_k${WAVE_NUMBER}_order_*.vtk ./${DIR_NAME}_${ERROR_TYPE}_waveguide
112 # rm -rf h_refinement_test_best_approximation_k_errorlv_*.txt
113 # rm -rf ${DIR_NAME}_${ERROR_TYPE}_droplet_p
114 # rm -rf h_refinement_error_hard_droplet_k_lobatto_${LOBATTO}_errorlv_*_type_*.txt
115 rm -rf h_refinement_hard_droplet_k_lobatto_${LOBATTO}_errorlv_*_type_*.txt
116 
117 # | rm -rf norm_error_k*_order_*.vtk
118 
119 # rm -rf p_refinement_adaptivity_*_test_best_approximation_k_errorlv_*.txt
120 # rm -rf ${DIR_NAME}_${ERROR_TYPE}_droplet_p
121 # rm -rf p_refinement_adaptivity_*_error_hard_droplet_k_lobatto_${LOBATTO}_errorlv_*_type_*.txt
122 rm -rf p_refinement_adaptivity_*_hard_droplet_k_lobatto_${LOBATTO}_errorlv_*_type_*.txt
123 # rm -rf adaptivity_p_refinement_adaptivity_*_error_hard_droplet_k_lobatto_${LOBATTO}_errorlv_*_type_*.txt
124 rm -rf adaptivity_p_refinement_adaptivity_*_hard_droplet_k_lobatto_${LOBATTO}_errorlv_*_type_*.txt
125 
126 
127 # for batman in `seq 1 1`;
128 # do
129 
130  #echo $NB_PROC
131  #BEGIN analytical solution
132 # mpirun -np 8 ./best_approximation \
133 # -my_file impinging_droplet.cub \
134 # -my_is_partitioned false \
135 # -wave_number $WAVE_NUMBER \
136 # -wave_direction 1,0,0 \
137 # -analytical_solution_type hard_droplet_incident_wave \
138 # -save_postproc_mesh false \
139 # -ksp_type fgmres \
140 # -pc_type lu \
141 # -pc_factor_mat_solver_package mumps \
142 # -ksp_monitor \
143 # -my_order 7 \
144 # -my_max_post_proc_ref_level 0 \
145 # -add_incident_wave false \
146 # -amplitude_of_incident_wave 1
147 # done
148 
149 # for ODISP in `seq 1 4`;
150 
151 #Frequencies : 1 5 10 20 30 40 50 70
152 
153 
154 
155 for ERROR_TYPE in "l2" "h1"
156 do
157 
158 if [ $ERROR_TYPE = "h1" ]
159 then PRIORI_TYPE="2"
160 fi
161 
162 
163 # for WAVE_NUMBER in "0.3142" "1.5708" "3.1416" "6.2832" "9.4248" "12.5664" "15.7080"
164 # 1 5 10 30 50 70
165 # for WAVE_NUMBER in "1" "3" "6" "8" "15" "20"
166 # "3" "6" "8" fails
167 
168 for ERRORLV in "2" "1" "0"
169 do
170 
171 # echo LOG: sound hard droplet P convergence test
172 # echo | tee -a p_refinement_adaptivity_${ADAPTIVITY}_test_best_approximation_k_errorlv_${ERRORLV}.txt
173 echo | tee -a p_refinement_adaptivity_${ADAPTIVITY}_hard_droplet_k_lobatto_${LOBATTO}_errorlv_${ERRORLV}_type_${ERROR_TYPE}.txt
174 # echo | tee -a p_refinement_adaptivity_${ADAPTIVITY}_error_hard_droplet_k_lobatto_${LOBATTO}_errorlv_${ERRORLV}_type_${ERROR_TYPE}.txt
175 echo | tee -a adaptivity_p_refinement_adaptivity_true_hard_droplet_k_lobatto_${LOBATTO}_errorlv_${ERRORLV}_type_${ERROR_TYPE}.txt
176 # echo | tee -a adaptivity_p_refinement_adaptivity_true_error_hard_droplet_k_lobatto_${LOBATTO}_errorlv_${ERRORLV}_type_${ERROR_TYPE}.txt
177 echo | tee -a h_refinement_hard_droplet_k_lobatto_${LOBATTO}_errorlv_${ERRORLV}_type_${ERROR_TYPE}.txt
178 # echo | tee -a h_refinement_error_hard_droplet_k_lobatto_${LOBATTO}_errorlv_${ERRORLV}_type_${ERROR_TYPE}.txt
179 echo " nze memory time CPUtime "| tee -a p_refinement_adaptivity_${ADAPTIVITY}_hard_droplet_k_lobatto_${LOBATTO}_errorlv_${ERRORLV}_type_${ERROR_TYPE}.txt
180 echo " nze memory time CPUtime "| tee -a h_refinement_hard_droplet_k_lobatto_${LOBATTO}_errorlv_${ERRORLV}_type_${ERROR_TYPE}.txt
181 echo " avg nze max min DOFs memory unit time CPUtime "| tee -a adaptivity_p_refinement_adaptivity_true_hard_droplet_k_lobatto_${LOBATTO}_errorlv_${ERRORLV}_type_${ERROR_TYPE}.txt
182 # echo "${ERROR_TYPE}relative error "| tee -a p_refinement_adaptivity_${ADAPTIVITY}_error_hard_droplet_k_lobatto_${LOBATTO}_errorlv_${ERRORLV}_type_${ERROR_TYPE}.txt
183 # echo "${ERROR_TYPE}relative error "| tee -a h_refinement_error_hard_droplet_k_lobatto_${LOBATTO}_errorlv_${ERRORLV}_type_${ERROR_TYPE}.txt
184 # echo "${ERROR_TYPE}relative error "| tee -a adaptivity_p_refinement_adaptivity_true_error_hard_droplet_k_lobatto_${LOBATTO}_errorlv_${ERRORLV}_type_${ERROR_TYPE}.txt
185 
186 
187 
188 COUNT="0"
189 
190 # for WAVE_NUMBER in "0.2" "0.4" "0.6" "0.8" "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"
191 # do
192 
193 for WAVE_NUMBER in "0" "1083.3" "2166.6" "3249.9" "4333.2" "5416.5" "6499.8" "7583.2" "8666.5" "9749.8" "10833" "11916" "13000" "14083" "15166" "16250" "17333" "18416" "19500" "20583" "21666" "22749" "23833" "24916" "25999" "27083" "28166" "29249" "30333" "31416"
194 do
195 
196 
197 # if [ "$WAVE_NUMBER" -gt "6" ]
198 # then NB_PROC=`expr 8`
199 # else NB_PROC=`expr 4`
200 # fi
201 # # echo NB_PROC = $NB_PROC
202 #
203 # # COUNT is the representation for uniform adaptivity vavenumber
204 # COUNT=`expr $COUNT + 1`
205 
206 
207 
208 
209 
210 echo "Start convergence test for sound hard droplet ..."
211 
212 # if [ $partition = true ]; then mbpart -t -p PARTKWAY $NB_PROC impinging_droplet.cub impinging_droplet_parts$NB_PROC.h5m; fi
213 
214 # if [ $partition = true ]
215 # then file1="impinging_droplet_parts$NB_PROC.h5m" && file2="best_solution.h5m"
216 # fi
217 
218 
219 
220 # BEST_NB_PRC=`expr 2 + $ODISP`
221 
222 # echo "Start P enrichment analytical best_approximation calculation with $BEST_NB_PRC processes, mesh h$ODISP and order 8 and wavenumber $WAVE_NUMBER, error level $ERRORLV"
223 #
224 # #BEGIN analytical solution
225 # mpirun -np $BEST_NB_PRC ./best_approximation \
226 # -my_file impinging_droplet.cub \
227 # -my_is_partitioned false \
228 # -wave_number $WAVE_NUMBER \
229 # -wave_direction 1,0,0 \
230 # -analytical_solution_type hard_droplet_scatter_wave \
231 # -save_postproc_mesh false \
232 # -ksp_type fgmres \
233 # -pc_type lu \
234 # -pc_factor_mat_solver_package superlu_dist \
235 # -ksp_monitor \
236 # -my_order 8 \
237 # -my_max_post_proc_ref_level 0 \
238 # -add_incident_wave false \
239 # -lobatto true 2>&1 |
240 # echo $(grep --line-buffered -i "Residual norm\|Time =" | sort | uniq) | tee -a -i adaptivity_p_refinement_adaptivity_${ADAPTIVITY}_test_best_approximation_k_errorlv_${ERRORLV}.txt
241 
242 
243 # for ORDER in {1..7..1};
244 # for ORDER in `seq 1 8`;
245 # do
246  # let NB_PROC+=${ORDER}
247  # NB_PROC=`expr $ORDER + 1`
248 # if [ "$ORDER" -gt "$ODISP" ]
249 # then NB_PROC=`expr $ORDER + 1`
250 # else NB_PROC=`expr $ODISP + 1`
251 # fi
252 # $(echo $(( 2 * $ODISP )))
253  # NB_PROC=`expr $ODISP + $(echo $(( 2 * $ERRORLV )))`
254  MPIRUN="mpirun -np $NB_PROC"
255 
256 
257  #To use partitioned mesh, first mbpart -t -p PARTKWAY 4 droplet4.cub droplet4_4parts.h5m,
258 # let NB_PROC=${ORDER}+1
259 # #echo $NB_PROC
260  # #BEGIN analytical solution
261  # $MPIRUN $BIN_PATH/best_approximation \
262  # -my_file $file1 \
263  # -my_is_partitioned $partition \
264  # -wave_number $WAVE_NUMBER \
265  # -wave_direction 1,0,0 \
266  # -analytical_solution_type hard_droplet_incident_wave \
267  # -save_postproc_mesh false \
268  # -ksp_type fgmres \
269  # -pc_type lu \
270  # -pc_factor_mat_solver_package mumps \
271  # -ksp_monitor \
272  # -my_order $ORDER \
273  # -my_max_post_proc_ref_level 0 \
274  # -add_incident_wave false \
275 ADAPTIVITY="true"
276 #
277 #BEGIN numerical solution
278 #echo " "| tee -a hard_droplet_k_${WAVE_NUMBER}_lobatto_${LOBATTO}_errorlv_${ERRORLV}_type_${ERROR_TYPE}.txt
279 #echo "${ERROR_TYPE}relative error "| tee -a error_hard_droplet_k_${WAVE_NUMBER}_lobatto_${LOBATTO}_errorlv_${ERRORLV}_type_${ERROR_TYPE}.txt
280 #echo " "| tee -a hard_droplet_k_${WAVE_NUMBER}_lobatto_${LOBATTO}_errorlv_${ERRORLV}_type_${ERROR_TYPE}.txt
281 #echo "Start numerical calculation with $NB_PROC processes, mesh h$ODISP and order $ORDER ..." | tee -a hard_droplet_k_${WAVE_NUMBER}_lobatto_${LOBATTO}_errorlv_${ERRORLV}_type_${ERROR_TYPE}.txt
282 echo "Start automatic adaptivity P enrichment numerical calculation with $NB_PROC processes, P Non-uniform ? true, mesh h$ODISP and order $ORDER and wavenumber $WAVE_NUMBER, error level $ERRORLV"
283 mpirun -np 8 ./fe_approximation \
284 -my_file non_uniform_droplet.cub \
285 -my_is_partitioned false \
286 -wave_number $WAVE_NUMBER \
287 -wave_direction 1,0,0 \
288 -wave_oscilation_direction -0.3756,-0.9268,3.2051e-09 \
289 -material_coefficient1 -1348.8 \
290 -save_postproc_mesh false \
291 -ksp_type fgmres \
292 -pc_type lu \
293 -pc_factor_mat_solver_package mumps \
294 -ksp_monitor \
295 -my_order 1 \
296 -my_max_post_proc_ref_level 0 \
297 -amplitude_of_incident_wave 1 \
298 -duffy true \
299 -lobatto true \
300 -adaptivity true \
301 -error_level $ERRORLV \
302 -error_type $PRIORI_TYPE \
303 -add_incident_wave false 2>&1 |
304 echo $(grep --line-buffered -i "Problem ACOUSTIC_PROBLEM Nb. rows\|max_value_order_p\|min_value_order_p\|avg_value_order_p\|nz_used\|Time =\|Memory usage =" | sort | uniq) | awk '{print $2,$4,$6,$8,$13,$23,$30,$35}' | tee -a -i adaptivity_p_refinement_adaptivity_true_hard_droplet_k_lobatto_${LOBATTO}_errorlv_${ERRORLV}_type_${ERROR_TYPE}.txt
305 echo " "
306 # echo " begin error calculation "
307 echo " check if data is correct "
308 #echo $(grep --line-buffered -i "Problem ACOUSTIC_PROBLEM Nb. rows\|nz_used\|Time =\|Memory usage =" | sort | uniq) | awk '{print $2,$7,$17,$24,$25,$29,$30}' | tee -a -i hard_droplet_k_${WAVE_NUMBER}_lobatto_${LOBATTO}_errorlv_${ERRORLV}_type_${ERROR_TYPE}.txt
309 #echo $(grep --line-buffered -i "Problem ACOUSTIC_PROBLEM Nb. rows\|nz_used\|Time =\|Memory usage =" | sort | uniq) | tee -a -i hard_droplet_k_${WAVE_NUMBER}_lobatto_${LOBATTO}_errorlv_${ERRORLV}_type_${ERROR_TYPE}.txt
310 #BEGIN error calculation awk '{print $6,$12}' grep first 10 lines |head -10|
311 #grep --line-buffered -i "Problem ACOUSTIC_PROBLEM Nb. rows\|Time =\|Memory usage =" | tee -a -i hard_droplet_k_${WAVE_NUMBER}_lobatto_${LOBATTO}_errorlv_${ERRORLV}_type_${ERROR_TYPE}.txt
312 
313 # mpirun -np 2 ./error_norm \
314 # -my_file ./fe_solution.h5m \
315 # -my_is_partitioned false \
316 # -norm_type $ERROR_TYPE \
317 # -relative_error false \
318 # -ksp_type fgmres \
319 # -pc_type lu \
320 # -pc_factor_mat_solver_package superlu_dist \
321 # -ksp_monitor \
322 # -my_order 1 \
323 # -my_max_post_proc_ref_level 0 \
324 # -save_postproc_mesh false 2>&1 | echo $(grep --line-buffered -i " realtive error ") | awk '{print $6,$12}' | tee -a -i adaptivity_p_refinement_adaptivity_true_error_hard_droplet_k_lobatto_${LOBATTO}_errorlv_${ERRORLV}_type_${ERROR_TYPE}.txt
325 # #RENAME files inot their order and wave number.
326 # # mbconvert norm_error.h5m norm_error.vtk |
327 # # mv norm_error.vtk norm_error_k${WAVE_NUMBER}_order_${ORDER}.vtk
328 
329 mbpart -t -p PARTKWAY 8 coarse_droplet.cub coarse_droplet_8.h5m
330 
331 ############### START UNIFORM ADAPTIVITY calculation ####################
332 ADAPTIVITY="false"
333 
334 echo "Start uniform P enrichment numerical calculation with $NB_PROC processes, P Non-uniform ? ${ADAPTIVITY}. mesh coarse_droplet.cub and order 7 ($COUNT) and wavenumber $WAVE_NUMBER, error level $ERRORLV"
335 mpirun -np $NB_PROC ./fe_approximation \
336 -my_file coarse_droplet_8.h5m \
337 -my_is_partitioned true \
338 -wave_number $WAVE_NUMBER \
339 -wave_direction 1,0,0 \
340 -wave_oscilation_direction -0.3756,-0.9268,3.2051e-09 \
341 -material_coefficient1 -1348.8 \
342 -save_postproc_mesh false \
343 -ksp_type fgmres \
344 -pc_type lu \
345 -pc_factor_mat_solver_package mumps \
346 -ksp_monitor \
347 -my_order 7 \
348 -my_max_post_proc_ref_level 0 \
349 -amplitude_of_incident_wave 1 \
350 -duffy true \
351 -lobatto $LOBATTO \
352 -adaptivity false \
353 -error_level $ERRORLV \
354 -error_type $PRIORI_TYPE \
355 -add_incident_wave false 2>&1 |
356 echo $(grep --line-buffered -i "Problem ACOUSTIC_PROBLEM Nb. rows\|max_value_order_p\|min_value_order_p\|avg_value_order_p\|nz_used\|Time =\|Memory usage =" | sort | uniq) | awk '{print $2,$9,$16,$21}' | tee -a -i p_refinement_adaptivity_${ADAPTIVITY}_hard_droplet_k_lobatto_${LOBATTO}_errorlv_${ERRORLV}_type_${ERROR_TYPE}.txt
357 echo " "
358 # echo " begin error calculation "
359 echo " check if data is correct "
360 #echo $(grep --line-buffered -i "Problem ACOUSTIC_PROBLEM Nb. rows\|nz_used\|Time =\|Memory usage =" | sort | uniq) | awk '{print $2,$7,$17,$24,$25,$29,$30}' | tee -a -i hard_droplet_k_${WAVE_NUMBER}_lobatto_${LOBATTO}_errorlv_${ERRORLV}_type_${ERROR_TYPE}.txt
361 #echo $(grep --line-buffered -i "Problem ACOUSTIC_PROBLEM Nb. rows\|nz_used\|Time =\|Memory usage =" | sort | uniq) | tee -a -i hard_droplet_k_${WAVE_NUMBER}_lobatto_${LOBATTO}_errorlv_${ERRORLV}_type_${ERROR_TYPE}.txt
362 #BEGIN error calculation awk '{print $6,$12}' grep first 10 lines |head -10|
363 #grep --line-buffered -i "Problem ACOUSTIC_PROBLEM Nb. rows\|Time =\|Memory usage =" | tee -a -i hard_droplet_k_${WAVE_NUMBER}_lobatto_${LOBATTO}_errorlv_${ERRORLV}_type_${ERROR_TYPE}.txt
364 
365 # mpirun -np 2 ./error_norm \
366 # -my_file ./fe_solution.h5m \
367 # -my_is_partitioned false \
368 # -norm_type $ERROR_TYPE \
369 # -relative_error false \
370 # -ksp_type fgmres \
371 # -pc_type lu \
372 # -pc_factor_mat_solver_package superlu_dist \
373 # -ksp_monitor \
374 # -my_order 1 \
375 # -my_max_post_proc_ref_level 0 \
376 # -save_postproc_mesh false 2>&1 | echo $(grep --line-buffered -i " realtive error ") | awk '{print $6,$12}' | tee -a -i p_refinement_adaptivity_${ADAPTIVITY}_error_hard_droplet_k_lobatto_${LOBATTO}_errorlv_${ERRORLV}_type_${ERROR_TYPE}.txt
377 #
378 
379 
380 mbpart -t -p PARTKWAY 8 dense_droplet.cub dense_droplet.h5m
381 
382 
383 ############### START H REFINEMENT calculation ####################
384 
385 # echo "Start H analytical calculation with $BEST_NB_PRC processes, mesh h${COUNT} and order 8 and wavenumber $WAVE_NUMBER, error level $ERRORLV"
386 #
387 # #BEGIN analytical solution
388 # mpirun -np $BEST_NB_PRC ./best_approximation \
389 # -my_file dense_droplet.h5m \
390 # -my_is_partitioned true \
391 # -wave_number $WAVE_NUMBER \
392 # -wave_direction 1,0,0 \
393 # -wave_oscilation_direction -0.3756,-0.9268,3.2051e-09 \
394 # -material_coefficient1 -1348.8 \
395 # -analytical_solution_type hard_droplet_scatter_wave \
396 # -save_postproc_mesh false \
397 # -ksp_type fgmres \
398 # -pc_type lu \
399 # -pc_factor_mat_solver_package superlu_dist \
400 # -ksp_monitor \
401 # -my_order 2 \
402 # -my_max_post_proc_ref_level 0 \
403 # -add_incident_wave false \
404 # -lobatto true 2>&1 |
405 # echo $(grep --line-buffered -i "Residual norm\|Time =" | sort | uniq) | tee -a -i h_refinement_test_best_approximation_k_errorlv_${ERRORLV}.txt
406 
407 
408 echo "Start H refinement numerical calculation with $NB_PROC processes, order = 2, H Refinement mesh dense_droplet.h5m and order 2 and wavenumber $WAVE_NUMBER, error level $ERRORLV"
409 mpirun -np $NB_PROC ./fe_approximation \
410 -my_file dense_droplet.h5m \
411 -my_is_partitioned true \
412 -wave_number $WAVE_NUMBER \
413 -wave_direction 1,0,0 \
414 -wave_oscilation_direction -0.3756,-0.9268,3.2051e-09 \
415 -material_coefficient1 -1348.8 \
416 -save_postproc_mesh false \
417 -ksp_type fgmres \
418 -pc_type lu \
419 -pc_factor_mat_solver_package mumps \
420 -ksp_monitor \
421 -my_order 2 \
422 -my_max_post_proc_ref_level 0 \
423 -amplitude_of_incident_wave 1 \
424 -duffy true \
425 -lobatto $LOBATTO \
426 -adaptivity false \
427 -add_incident_wave false 2>&1 |
428 echo $(grep --line-buffered -i "Problem ACOUSTIC_PROBLEM Nb. rows\|max_value_order_p\|min_value_order_p\|avg_value_order_p\|nz_used\|Time =\|Memory usage =" | sort | uniq) | awk '{print $2,$9,$16,$21}' | tee -a -i h_refinement_hard_droplet_k_lobatto_${LOBATTO}_errorlv_${ERRORLV}_type_${ERROR_TYPE}.txt
429 echo " "
430 # echo " begin error calculation "
431 echo " check if data is correct "
432 #echo $(grep --line-buffered -i "Problem ACOUSTIC_PROBLEM Nb. rows\|nz_used\|Time =\|Memory usage =" | sort | uniq) | awk '{print $2,$7,$17,$24,$25,$29,$30}' | tee -a -i hard_droplet_k_${WAVE_NUMBER}_lobatto_${LOBATTO}_errorlv_${ERRORLV}_type_${ERROR_TYPE}.txt
433 #echo $(grep --line-buffered -i "Problem ACOUSTIC_PROBLEM Nb. rows\|nz_used\|Time =\|Memory usage =" | sort | uniq) | tee -a -i hard_droplet_k_${WAVE_NUMBER}_lobatto_${LOBATTO}_errorlv_${ERRORLV}_type_${ERROR_TYPE}.txt
434 #BEGIN error calculation awk '{print $6,$12}' grep first 10 lines |head -10|
435 #grep --line-buffered -i "Problem ACOUSTIC_PROBLEM Nb. rows\|Time =\|Memory usage =" | tee -a -i hard_droplet_k_${WAVE_NUMBER}_lobatto_${LOBATTO}_errorlv_${ERRORLV}_type_${ERROR_TYPE}.txt
436 
437 # mpirun -np 2 ./error_norm \
438 # -my_file ./fe_solution.h5m \
439 # -my_is_partitioned false \
440 # -norm_type $ERROR_TYPE \
441 # -relative_error false \
442 # -ksp_type fgmres \
443 # -pc_type lu \
444 # -pc_factor_mat_solver_package superlu_dist \
445 # -ksp_monitor \
446 # -my_order 1 \
447 # -my_max_post_proc_ref_level 0 \
448 # -save_postproc_mesh false 2>&1 | echo $(grep --line-buffered -i " realtive error ") | awk '{print $6,$12}' | tee -a -i h_refinement_error_hard_droplet_k_lobatto_${LOBATTO}_errorlv_${ERRORLV}_type_${ERROR_TYPE}.txt
449 
450 
451 
452 # for ODISP in "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12"
453 # do
454 
455 
456 # done
457 
458 done
459 
460 done
461 
462 done
463 
464 #SAVE the results to different directory
465 # mkdir ${DIR_NAME}_${ERROR_TYPE}_droplet_p
466 # mv norm_error_k*_order_*.vtk ./${DIR_NAME}_${ERROR_TYPE}_droplet_p
467 
468 
469 # done
470 #foo="Hello"
471 #foo="$foo World"
472 #echo $foo
473 #> Hello World