File: hexagon.sh

package info (click to toggle)
gerris 20131206%2Bdfsg-21
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 14,252 kB
  • sloc: ansic: 66,595; sh: 15,922; f90: 1,513; makefile: 1,150; fortran: 696; python: 493; awk: 104; lisp: 89; xml: 27
file content (41 lines) | stat: -rw-r--r-- 896 bytes parent folder | download | duplicates (2)
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
if test x$donotrun != xtrue; then
    for order in 1 2 ; do
	if gerris2D -DORDER=$order hexagon.gfs; then :
	else
	    exit 1
	fi
    done

fi

if cat <<EOF | gnuplot ; then :
    set term postscript eps color lw 3 solid 20
    set output 'error.eps'
    set xlabel 'Time'
    set ylabel 'Norm2 of error on the velocity field'
    set yr [1e-10:0.1]
    set log y
    plot 'momentumerror-1' t 'first order' w lp, \
         'momentumerror-2' t 'second order' w lp
EOF
else
    exit 1
fi

if echo "Save end-2.eps { format = EPS }" | gfsview-batch2D end-2.gfs hexagon.gfv; then :
else
    exit 1
fi

if cat <<EOF | python3 ; then :
from check import *
from sys import *
if Curve('tracersum-1',1,2).normi() > 1e-6 or \
   Curve('tracersum-2',1,2).normi() > 5e-6 or \
   Curve('momentumerror-1',1,3).max() > 11e-3 or \
   Curve('momentumerror-2',1,3).max() > 2e-3:
    exit(1)
EOF
else
    exit 1
fi