tssa_testi_fem.sh - pism - [fork] customized build of PISM, the parallel ice sheet model (tillflux branch)
(HTM) git clone git://src.adamsgaard.dk/pism
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) LICENSE
---
tssa_testi_fem.sh (1323B)
---
1 #!/bin/bash
2
3 # SSAFEM verification test I regression test
4
5 PISM_PATH=$1
6 MPIEXEC=$2
7 MPIEXEC_COMMAND="$MPIEXEC -n 2"
8 PISM_SOURCE_DIR=$3
9 EXT=""
10 if [ $# -ge 4 ] && [ "$4" == "-python" ]
11 then
12 PYTHONEXEC=$5
13 MPIEXEC_COMMAND="$MPIEXEC_COMMAND $PYTHONEXEC"
14 PYTHONPATH=${PISM_PATH}/site-packages:${PYTHONPATH}
15 PISM_PATH=${PISM_SOURCE_DIR}/examples/python/ssa_tests
16 EXT=".py"
17 fi
18
19 # List of files to remove when done:
20 files="foo-fem-i.nc foo-fem-i.nc~ test-I-out-fem.txt"
21
22 rm -f $files
23
24 set -e
25
26 OPTS="-verbose 1 -ssa_method fem -o foo-fem-i.nc -Mx 5 -ksp_type cg"
27
28 # do stuff
29 $MPIEXEC_COMMAND $PISM_PATH/ssa_testi${EXT} -My 61 $OPTS > test-I-out-fem.txt
30 $MPIEXEC_COMMAND $PISM_PATH/ssa_testi${EXT} -My 121 $OPTS >> test-I-out-fem.txt
31
32 set +e
33
34 # Check results:
35 diff test-I-out-fem.txt - <<END-OF-OUTPUT
36 NUMERICAL ERRORS in velocity relative to exact solution:
37 velocity : maxvector prcntavvec maxu maxv avu avv
38 16.2024 0.14888 16.2024 0.7544 1.1522 0.0513
39 NUM ERRORS DONE
40 NUMERICAL ERRORS in velocity relative to exact solution:
41 velocity : maxvector prcntavvec maxu maxv avu avv
42 4.2045 0.03669 4.2045 0.1967 0.2838 0.0134
43 NUM ERRORS DONE
44 END-OF-OUTPUT
45
46 if [ $? != 0 ];
47 then
48 exit 1
49 fi
50
51 rm -f $files; exit 0