Skip to content
Snippets Groups Projects
Commit f8931fae authored by Melanie Lipp's avatar Melanie Lipp
Browse files

[freeflow] further cleanup convergence script.

parent bd877ccc
No related branches found
No related tags found
1 merge request!1326Freeflow/convergencescript cleanup
#! /bin/bash
# usage: build the executable in the build directory, copy the file to the folder with the executable, an example command to run the script is ./convergence.sh test_ff_stokes_donea ./params.input 2 4
if [ $# -ne 4 ]; then
echo "usage: $0 EXECUTABLE_NAME PARAMS DIMENSION NUM_REFINEMENT_STEPS"
......@@ -27,7 +28,7 @@ MAXCELLS=$INITIALCELLS
for (( i=0; i <= $MAX; ++i )); do
printf "refinement $i / $MAX "
((MAXCELLS *=2))
./$1 params.input -Grid.Cells "$GRIDCELLS" -Grid.Refinement $i -Problem.PrintL2Error true &>> $LOGFILE
./$1 $2 -Grid.Cells "$GRIDCELLS" -Grid.Refinement $i -Problem.PrintL2Error true &>> $LOGFILE
echo "done."
done
......@@ -37,13 +38,15 @@ set terminal pngcairo size 1000,750
set output 'convergence.png'
set xrange [($INITIALCELLS-1):$MAXCELLS]
set yrange [:1]
set format x '10^{%L}'
set format y '10^{%L}'
set xlabel 'number of cells per dimension'
set ylabel 'l2 error (abs)'
set ylabel 'abs(l2 error)'
set log x
set log y" > $1.gp
PLOT="plot x**-1 w l lc rgb 'gray40' t 'O_1', \
x**-2 w l lc rgb 'blue20' t 'O_2', \
PLOT="plot x**-1 w l lc rgb 'gray40' t 'order_1', \
x**-2 w l lc rgb 'blue20' t 'order_2', \
'$L2ERRORFILE' u (\$6**(1./$DIM.)):17 w lp t 'pressure', \
'$L2ERRORFILE' u (\$6**(1./$DIM.)):23 w lp t 'velocity_x'"
if [ $DIM == 2 ]; then
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment