v0.10.0
adaptivity_compare_cylinder.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_cylinder_$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}_cylinder_p
114 rm -rf h_refinement_error_hard_cylinder_k_lobatto_${LOBATTO}_errorlv_*_type_*.txt
115 rm -rf h_refinement_hard_cylinder_k_lobatto_${LOBATTO}_errorlv_*_type_*.txt | rm -rf norm_error_k*_order_*.vtk
116 
117 rm -rf p_refinement_adaptivity_*_test_best_approximation_k_errorlv_*.txt
118 # rm -rf ${DIR_NAME}_${ERROR_TYPE}_cylinder_p
119 rm -rf p_refinement_adaptivity_*_error_hard_cylinder_k_lobatto_${LOBATTO}_errorlv_*_type_*.txt
120 rm -rf p_refinement_adaptivity_*_hard_cylinder_k_lobatto_${LOBATTO}_errorlv_*_type_*.txt
121 rm -rf adaptivity_p_refinement_adaptivity_*_error_hard_cylinder_k_lobatto_${LOBATTO}_errorlv_*_type_*.txt
122 rm -rf adaptivity_p_refinement_adaptivity_*_hard_cylinder_k_lobatto_${LOBATTO}_errorlv_*_type_*.txt
123 
124 
125 # for batman in `seq 1 1`;
126 # do
127 
128  #echo $NB_PROC
129  #BEGIN analytical solution
130 # mpirun -np 8 ./best_approximation \
131 # -my_file impinging_cylinder.cub \
132 # -my_is_partitioned false \
133 # -wave_number $WAVE_NUMBER \
134 # -wave_direction 1,0,0 \
135 # -analytical_solution_type hard_cylinder_incident_wave \
136 # -save_postproc_mesh false \
137 # -ksp_type fgmres \
138 # -pc_type lu \
139 # -pc_factor_mat_solver_package mumps \
140 # -ksp_monitor \
141 # -my_order 7 \
142 # -my_max_post_proc_ref_level 0 \
143 # -add_incident_wave false \
144 # -amplitude_of_incident_wave 1
145 # done
146 
147 # for ODISP in `seq 1 4`;
148 
149 #Frequencies : 1 5 10 20 30 40 50 70
150 
151 
152 
153 for ERROR_TYPE in "l2" "h1"
154 do
155 
156 if [ $ERROR_TYPE = "h1" ]
157 then PRIORI_TYPE="2"
158 fi
159 
160 
161 # for WAVE_NUMBER in "0.3142" "1.5708" "3.1416" "6.2832" "9.4248" "12.5664" "15.7080"
162 # 1 5 10 30 50 70
163 # for WAVE_NUMBER in "1" "3" "6" "8" "15" "20"
164 # "3" "6" "8" fails
165 
166 for ERRORLV in "2"
167 do
168 
169 # echo LOG: sound hard cylinder P convergence test
170 echo | tee -a p_refinement_adaptivity_${ADAPTIVITY}_test_best_approximation_k_errorlv_${ERRORLV}.txt
171 echo | tee -a p_refinement_adaptivity_${ADAPTIVITY}_hard_cylinder_k_lobatto_${LOBATTO}_errorlv_${ERRORLV}_type_${ERROR_TYPE}.txt
172 echo | tee -a p_refinement_adaptivity_${ADAPTIVITY}_error_hard_cylinder_k_lobatto_${LOBATTO}_errorlv_${ERRORLV}_type_${ERROR_TYPE}.txt
173 echo | tee -a adaptivity_p_refinement_adaptivity_true_hard_cylinder_k_lobatto_${LOBATTO}_errorlv_${ERRORLV}_type_${ERROR_TYPE}.txt
174 echo | tee -a adaptivity_p_refinement_adaptivity_true_error_hard_cylinder_k_lobatto_${LOBATTO}_errorlv_${ERRORLV}_type_${ERROR_TYPE}.txt
175 echo | tee -a h_refinement_hard_cylinder_k_lobatto_${LOBATTO}_errorlv_${ERRORLV}_type_${ERROR_TYPE}.txt
176 echo | tee -a h_refinement_error_hard_cylinder_k_lobatto_${LOBATTO}_errorlv_${ERRORLV}_type_${ERROR_TYPE}.txt
177 echo " nze DOFs memory unit time CPUtime "| tee -a p_refinement_adaptivity_${ADAPTIVITY}_hard_cylinder_k_lobatto_${LOBATTO}_errorlv_${ERRORLV}_type_${ERROR_TYPE}.txt
178 echo " nze DOFs memory unit time CPUtime "| tee -a h_refinement_hard_cylinder_k_lobatto_${LOBATTO}_errorlv_${ERRORLV}_type_${ERROR_TYPE}.txt
179 echo " avg nze max min DOFs memory unit time CPUtime "| tee -a adaptivity_p_refinement_adaptivity_true_hard_cylinder_k_lobatto_${LOBATTO}_errorlv_${ERRORLV}_type_${ERROR_TYPE}.txt
180 echo "${ERROR_TYPE}relative error "| tee -a p_refinement_adaptivity_${ADAPTIVITY}_error_hard_cylinder_k_lobatto_${LOBATTO}_errorlv_${ERRORLV}_type_${ERROR_TYPE}.txt
181 echo "${ERROR_TYPE}relative error "| tee -a h_refinement_error_hard_cylinder_k_lobatto_${LOBATTO}_errorlv_${ERRORLV}_type_${ERROR_TYPE}.txt
182 echo "${ERROR_TYPE}relative error "| tee -a adaptivity_p_refinement_adaptivity_true_error_hard_cylinder_k_lobatto_${LOBATTO}_errorlv_${ERRORLV}_type_${ERROR_TYPE}.txt
183 
184 
185 
186 COUNT="0"
187 
188 for WAVE_NUMBER in "1" "3" "5" "7" "10" "15" "20" "25"
189 do
190 
191 
192 if [ "$WAVE_NUMBER" -gt "6" ]
193 then NB_PROC=`expr 8`
194 else NB_PROC=`expr 4`
195 fi
196 # echo NB_PROC = $NB_PROC
197 
198 # COUNT is the representation for uniform adaptivity vavenumber
199 COUNT=`expr $COUNT + 1`
200 
201 
202 
203 
204 
205 echo "Start convergence test for sound hard cylinder ..."
206 
207 # if [ $partition = true ]; then mbpart -t -p PARTKWAY $NB_PROC impinging_cylinder.cub impinging_cylinder_parts$NB_PROC.h5m; fi
208 
209 # if [ $partition = true ]
210 # then file1="impinging_cylinder_parts$NB_PROC.h5m" && file2="best_solution.h5m"
211 # fi
212 
213 
214 
215 # BEST_NB_PRC=`expr 2 + $ODISP`
216 
217 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"
218 
219 #BEGIN analytical solution
220 mpirun -np $BEST_NB_PRC ./best_approximation \
221 -my_file impinging_cylinder.cub \
222 -my_is_partitioned false \
223 -wave_number $WAVE_NUMBER \
224 -wave_direction 1,0,0 \
225 -analytical_solution_type hard_cylinder_scatter_wave \
226 -save_postproc_mesh false \
227 -ksp_type fgmres \
228 -pc_type lu \
229 -pc_factor_mat_solver_package superlu_dist \
230 -ksp_monitor \
231 -my_order 8 \
232 -my_max_post_proc_ref_level 0 \
233 -add_incident_wave false \
234 -lobatto true 2>&1 |
235 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
236 
237 
238 # for ORDER in {1..7..1};
239 # for ORDER in `seq 1 8`;
240 # do
241  # let NB_PROC+=${ORDER}
242  # NB_PROC=`expr $ORDER + 1`
243 # if [ "$ORDER" -gt "$ODISP" ]
244 # then NB_PROC=`expr $ORDER + 1`
245 # else NB_PROC=`expr $ODISP + 1`
246 # fi
247 # $(echo $(( 2 * $ODISP )))
248  # NB_PROC=`expr $ODISP + $(echo $(( 2 * $ERRORLV )))`
249  MPIRUN="mpirun -np $NB_PROC"
250 
251 
252  #To use partitioned mesh, first mbpart -t -p PARTKWAY 4 cylinder4.cub cylinder4_4parts.h5m,
253 # let NB_PROC=${ORDER}+1
254 # #echo $NB_PROC
255  # #BEGIN analytical solution
256  # $MPIRUN $BIN_PATH/best_approximation \
257  # -my_file $file1 \
258  # -my_is_partitioned $partition \
259  # -wave_number $WAVE_NUMBER \
260  # -wave_direction 1,0,0 \
261  # -analytical_solution_type hard_cylinder_incident_wave \
262  # -save_postproc_mesh false \
263  # -ksp_type fgmres \
264  # -pc_type lu \
265  # -pc_factor_mat_solver_package mumps \
266  # -ksp_monitor \
267  # -my_order $ORDER \
268  # -my_max_post_proc_ref_level 0 \
269  # -add_incident_wave false \
270 ADAPTIVITY="true"
271 #
272 #BEGIN numerical solution
273 #echo " "| tee -a hard_cylinder_k_${WAVE_NUMBER}_lobatto_${LOBATTO}_errorlv_${ERRORLV}_type_${ERROR_TYPE}.txt
274 #echo "${ERROR_TYPE}relative error "| tee -a error_hard_cylinder_k_${WAVE_NUMBER}_lobatto_${LOBATTO}_errorlv_${ERRORLV}_type_${ERROR_TYPE}.txt
275 #echo " "| tee -a hard_cylinder_k_${WAVE_NUMBER}_lobatto_${LOBATTO}_errorlv_${ERRORLV}_type_${ERROR_TYPE}.txt
276 #echo "Start numerical calculation with $NB_PROC processes, mesh h$ODISP and order $ORDER ..." | tee -a hard_cylinder_k_${WAVE_NUMBER}_lobatto_${LOBATTO}_errorlv_${ERRORLV}_type_${ERROR_TYPE}.txt
277 echo "Start 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"
278 mpirun -np $NB_PROC ./fe_approximation \
279 -my_file analytical_solution.h5m \
280 -my_is_partitioned false \
281 -wave_number $WAVE_NUMBER \
282 -wave_direction 1,0,0 \
283 -save_postproc_mesh false \
284 -ksp_type fgmres \
285 -pc_type lu \
286 -pc_factor_mat_solver_package superlu_dist \
287 -ksp_monitor \
288 -my_order 1 \
289 -my_max_post_proc_ref_level 0 \
290 -amplitude_of_incident_wave 1 \
291 -duffy $DUFFY \
292 -lobatto $LOBATTO \
293 -adaptivity true \
294 -error_level $ERRORLV \
295 -error_type $PRIORI_TYPE \
296 -add_incident_wave false 2>&1 |
297 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_cylinder_k_lobatto_${LOBATTO}_errorlv_${ERRORLV}_type_${ERROR_TYPE}.txt
298 echo " "
299 echo " begin error calculation "
300 echo " "
301 #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_cylinder_k_${WAVE_NUMBER}_lobatto_${LOBATTO}_errorlv_${ERRORLV}_type_${ERROR_TYPE}.txt
302 #echo $(grep --line-buffered -i "Problem ACOUSTIC_PROBLEM Nb. rows\|nz_used\|Time =\|Memory usage =" | sort | uniq) | tee -a -i hard_cylinder_k_${WAVE_NUMBER}_lobatto_${LOBATTO}_errorlv_${ERRORLV}_type_${ERROR_TYPE}.txt
303 #BEGIN error calculation awk '{print $6,$12}' grep first 10 lines |head -10|
304 #grep --line-buffered -i "Problem ACOUSTIC_PROBLEM Nb. rows\|Time =\|Memory usage =" | tee -a -i hard_cylinder_k_${WAVE_NUMBER}_lobatto_${LOBATTO}_errorlv_${ERRORLV}_type_${ERROR_TYPE}.txt
305 
306 mpirun -np 2 ./error_norm \
307 -my_file ./fe_solution.h5m \
308 -my_is_partitioned false \
309 -norm_type $ERROR_TYPE \
310 -relative_error false \
311 -ksp_type fgmres \
312 -pc_type lu \
313 -pc_factor_mat_solver_package superlu_dist \
314 -ksp_monitor \
315 -my_order 1 \
316 -my_max_post_proc_ref_level 0 \
317 -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_cylinder_k_lobatto_${LOBATTO}_errorlv_${ERRORLV}_type_${ERROR_TYPE}.txt
318 #RENAME files inot their order and wave number.
319 # mbconvert norm_error.h5m norm_error.vtk |
320 # mv norm_error.vtk norm_error_k${WAVE_NUMBER}_order_${ORDER}.vtk
321 
322 
323 ############### START UNIFORM ADAPTIVITY calculation ####################
324 ADAPTIVITY="false"
325 
326 echo "Start uniform P enrichment numerical calculation with $NB_PROC processes, P Non-uniform ? ${ADAPTIVITY} mesh h$ODISP and order $COUNT and wavenumber $WAVE_NUMBER, error level $ERRORLV"
327 mpirun -np $NB_PROC ./fe_approximation \
328 -my_file analytical_solution.h5m \
329 -my_is_partitioned false \
330 -wave_number $WAVE_NUMBER \
331 -wave_direction 1,0,0 \
332 -save_postproc_mesh false \
333 -ksp_type fgmres \
334 -pc_type lu \
335 -pc_factor_mat_solver_package superlu_dist \
336 -ksp_monitor \
337 -my_order $COUNT \
338 -my_max_post_proc_ref_level 0 \
339 -amplitude_of_incident_wave 1 \
340 -duffy $DUFFY \
341 -lobatto $LOBATTO \
342 -adaptivity false \
343 -error_level $ERRORLV \
344 -error_type $PRIORI_TYPE \
345 -add_incident_wave false 2>&1 |
346 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,$7,$17,$24,$29}' | tee -a -i p_refinement_adaptivity_${ADAPTIVITY}_hard_cylinder_k_lobatto_${LOBATTO}_errorlv_${ERRORLV}_type_${ERROR_TYPE}.txt
347 echo " "
348 echo " begin error calculation "
349 echo " "
350 #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_cylinder_k_${WAVE_NUMBER}_lobatto_${LOBATTO}_errorlv_${ERRORLV}_type_${ERROR_TYPE}.txt
351 #echo $(grep --line-buffered -i "Problem ACOUSTIC_PROBLEM Nb. rows\|nz_used\|Time =\|Memory usage =" | sort | uniq) | tee -a -i hard_cylinder_k_${WAVE_NUMBER}_lobatto_${LOBATTO}_errorlv_${ERRORLV}_type_${ERROR_TYPE}.txt
352 #BEGIN error calculation awk '{print $6,$12}' grep first 10 lines |head -10|
353 #grep --line-buffered -i "Problem ACOUSTIC_PROBLEM Nb. rows\|Time =\|Memory usage =" | tee -a -i hard_cylinder_k_${WAVE_NUMBER}_lobatto_${LOBATTO}_errorlv_${ERRORLV}_type_${ERROR_TYPE}.txt
354 
355 mpirun -np 2 ./error_norm \
356 -my_file ./fe_solution.h5m \
357 -my_is_partitioned false \
358 -norm_type $ERROR_TYPE \
359 -relative_error false \
360 -ksp_type fgmres \
361 -pc_type lu \
362 -pc_factor_mat_solver_package superlu_dist \
363 -ksp_monitor \
364 -my_order 1 \
365 -my_max_post_proc_ref_level 0 \
366 -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_cylinder_k_lobatto_${LOBATTO}_errorlv_${ERRORLV}_type_${ERROR_TYPE}.txt
367 
368 
369 
370 ############### START H REFINEMENT calculation ####################
371 
372 echo "Start H Refinement analytical calculation with $BEST_NB_PRC processes, mesh h${COUNT} and order 8 and wavenumber $WAVE_NUMBER, error level $ERRORLV"
373 
374 #BEGIN analytical solution
375 mpirun -np $BEST_NB_PRC ./best_approximation \
376 -my_file h_refinement_cylinder_${COUNT}.cub \
377 -my_is_partitioned false \
378 -wave_number $WAVE_NUMBER \
379 -wave_direction 1,0,0 \
380 -analytical_solution_type hard_cylinder_scatter_wave \
381 -save_postproc_mesh false \
382 -ksp_type fgmres \
383 -pc_type lu \
384 -pc_factor_mat_solver_package superlu_dist \
385 -ksp_monitor \
386 -my_order 6 \
387 -my_max_post_proc_ref_level 0 \
388 -add_incident_wave false \
389 -lobatto true 2>&1 |
390 echo $(grep --line-buffered -i "Residual norm\|Time =" | sort | uniq) | tee -a -i h_refinement_test_best_approximation_k_errorlv_${ERRORLV}.txt
391 
392 
393 echo "Start H refinement numerical calculation with $NB_PROC processes, H Refinement mesh h$COUNT and order 2 and wavenumber $WAVE_NUMBER, error level $ERRORLV"
394 mpirun -np $NB_PROC ./fe_approximation \
395 -my_file analytical_solution.h5m \
396 -my_is_partitioned false \
397 -wave_number $WAVE_NUMBER \
398 -wave_direction 1,0,0 \
399 -save_postproc_mesh false \
400 -ksp_type fgmres \
401 -pc_type lu \
402 -pc_factor_mat_solver_package superlu_dist \
403 -ksp_monitor \
404 -my_order 2 \
405 -my_max_post_proc_ref_level 0 \
406 -amplitude_of_incident_wave 1 \
407 -duffy $DUFFY \
408 -lobatto $LOBATTO \
409 -adaptivity false \
410 -error_level $ERRORLV \
411 -error_type $PRIORI_TYPE \
412 -add_incident_wave false 2>&1 |
413 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,$7,$17,$24,$29}' | tee -a -i h_refinement_hard_cylinder_k_lobatto_${LOBATTO}_errorlv_${ERRORLV}_type_${ERROR_TYPE}.txt
414 echo " "
415 echo " begin error calculation "
416 echo " "
417 #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_cylinder_k_${WAVE_NUMBER}_lobatto_${LOBATTO}_errorlv_${ERRORLV}_type_${ERROR_TYPE}.txt
418 #echo $(grep --line-buffered -i "Problem ACOUSTIC_PROBLEM Nb. rows\|nz_used\|Time =\|Memory usage =" | sort | uniq) | tee -a -i hard_cylinder_k_${WAVE_NUMBER}_lobatto_${LOBATTO}_errorlv_${ERRORLV}_type_${ERROR_TYPE}.txt
419 #BEGIN error calculation awk '{print $6,$12}' grep first 10 lines |head -10|
420 #grep --line-buffered -i "Problem ACOUSTIC_PROBLEM Nb. rows\|Time =\|Memory usage =" | tee -a -i hard_cylinder_k_${WAVE_NUMBER}_lobatto_${LOBATTO}_errorlv_${ERRORLV}_type_${ERROR_TYPE}.txt
421 
422 mpirun -np 2 ./error_norm \
423 -my_file ./fe_solution.h5m \
424 -my_is_partitioned false \
425 -norm_type $ERROR_TYPE \
426 -relative_error false \
427 -ksp_type fgmres \
428 -pc_type lu \
429 -pc_factor_mat_solver_package superlu_dist \
430 -ksp_monitor \
431 -my_order 1 \
432 -my_max_post_proc_ref_level 0 \
433 -save_postproc_mesh false 2>&1 | echo $(grep --line-buffered -i " realtive error ") | awk '{print $6,$12}' | tee -a -i h_refinement_error_hard_cylinder_k_lobatto_${LOBATTO}_errorlv_${ERRORLV}_type_${ERROR_TYPE}.txt
434 
435 
436 
437 # for ODISP in "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12"
438 # do
439 
440 
441 # done
442 
443 done
444 
445 done
446 
447 done
448 
449 #SAVE the results to different directory
450 # mkdir ${DIR_NAME}_${ERROR_TYPE}_cylinder_p
451 # mv norm_error_k*_order_*.vtk ./${DIR_NAME}_${ERROR_TYPE}_cylinder_p
452 
453 
454 # done
455 #foo="Hello"
456 #foo="$foo World"
457 #echo $foo
458 #> Hello World