tssafem_test_plug.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 --- tssafem_test_plug.sh (1340B) --- 1 #!/bin/bash 2 3 # SSAFEM plug flow 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-plug.nc foo-fem-plug.nc~ test-out-plug.txt" 21 22 rm -f $files 23 24 set -e 25 set -x 26 27 OPTS="-verbose 1 -ssa_method fem -o foo-fem-plug.nc -ksp_type cg" 28 29 # do stuff 30 $MPIEXEC_COMMAND $PISM_PATH/ssa_test_plug${EXT} -Mx 22 -My 31 $OPTS > test-out-plug.txt 31 $MPIEXEC_COMMAND $PISM_PATH/ssa_test_plug${EXT} -Mx 61 -My 61 $OPTS >> test-out-plug.txt 32 33 set +e 34 35 # Check results: 36 diff test-out-plug.txt - <<END-OF-OUTPUT 37 NUMERICAL ERRORS in velocity relative to exact solution: 38 velocity : maxvector prcntavvec maxu maxv avu avv 39 0.2024 0.00559 0.2024 0.0325 0.0765 0.0069 40 NUM ERRORS DONE 41 NUMERICAL ERRORS in velocity relative to exact solution: 42 velocity : maxvector prcntavvec maxu maxv avu avv 43 0.0510 0.00147 0.0510 0.0082 0.0201 0.0019 44 NUM ERRORS DONE 45 END-OF-OUTPUT 46 47 if [ $? != 0 ]; 48 then 49 exit 1 50 fi 51 52 rm -f $files; exit 0