File: zalesak-size-Pkd-nmax-error-vs-nmax-gdat-make.sh

package info (click to toggle)
rheolef 7.1-6
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 77,392 kB
  • sloc: cpp: 105,337; sh: 16,014; makefile: 5,293; python: 1,359; xml: 221; yacc: 218; javascript: 202; awk: 61; sed: 5
file content (45 lines) | stat: -rw-r--r-- 1,719 bytes parent folder | download | duplicates (4)
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
42
43
44
45
#!/bin/sh
#
# This file is part of Rheolef.
#
# Copyright (C) 2000-2018 Pierre Saramito 
#
# Rheolef is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# Rheolef is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Rheolef; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
# -------------------------------------------------------------------------
#
# influence of the nmax (time step)
# on the L1-error & mass-loss computation
#
ih=${1-"25"} # 1/h
k=${2-"2"}
subdivide=${3-"4"}
field_error=${4-"1e-12"}
loop=true
LN="13 25 49 94 187 375 750 1500 3000 6000 12000 24000 48000 96000"
echo "# generated by `basename $0`"
echo "# h = 1/${ih}"
echo "# k = ${k}"
echo "# subdivide = ${subdivide}"
echo "# field_error = ${field_error}"
echo "# nmax err_linf_l1 v_max size hmin"
for nmax in $LN; do
  branch="zalesak-${ih}-P${k}d-${nmax}.branch.gz"
  (zcat $branch | ./zalesak_dg_adapt ${subdivide} ${field_error} | ./zalesak_dg_error 1 ) 2>/dev/null > tmp.txt
  err_linf_l1=`grep err_linf_l1 tmp.txt | awk '{print $4}'`
  v_max=`grep v_max tmp.txt | awk '{print $4}'`
  size=`grep "omega.size" tmp.txt | awk '{print $4}'`
  hmin=`grep "hmin" tmp.txt | awk '{print $4}'`
  echo "$nmax $err_linf_l1 $v_max $size $hmin"
done