~ubuntu-branches/ubuntu/trusty/rheolef/trusty-proposed

« back to all changes in this revision

Viewing changes to nfem/tst/form_solve_tst.sh

  • Committer: Bazaar Package Importer
  • Author(s): Christophe Prud'homme
  • Date: 2010-06-12 09:08:59 UTC
  • Revision ID: james.westby@ubuntu.com-20100612090859-8gpm2gc7j3ab43et
Tags: upstream-5.89
ImportĀ upstreamĀ versionĀ 5.89

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/sh
 
2
#
 
3
# This file is part of Rheolef.
 
4
#
 
5
# Copyright (C) 2000-2009 Pierre Saramito 
 
6
#
 
7
# Rheolef is free software; you can redistribute it and/or modify
 
8
# it under the terms of the GNU General Public License as published by
 
9
# the Free Software Foundation; either version 2 of the License, or
 
10
# (at your option) any later version.
 
11
#
 
12
# Rheolef is distributed in the hope that it will be useful,
 
13
# but WITHOUT ANY WARRANTY; without even the implied warranty of
 
14
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
15
# GNU General Public License for more details.
 
16
#
 
17
# You should have received a copy of the GNU General Public License
 
18
# along with Rheolef; if not, write to the Free Software
 
19
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 
20
#
 
21
# -------------------------------------------------------------------------
 
22
SRCDIR=${SRCDIR-"../../../rheolef/nfem/tst"}
 
23
GEODIR=${GEODIR-"../../../rheolef/nfem/data"}
 
24
 
 
25
RHEOLEF_BASIS_PATH=${RHEOLEF_BASIS_PATH-"../basis"}
 
26
RHEOLEF_NUMBERING_PATH=${RHEOLEF_NUMBERING_PATH-"../basis"}
 
27
RHEOLEF_FORM_ELEMENT_PATH=${RHEOLEF_FORM_ELEMENT_PATH-"../form_element"}
 
28
export RHEOLEF_BASIS_PATH
 
29
export RHEOLEF_NUMBERING_PATH
 
30
export RHEOLEF_FORM_ELEMENT_PATH
 
31
 
 
32
status=0
 
33
 
 
34
command="../bin/mkgeo_grid_1d 10 | ./form_solve_tst P1 -round - left right"
 
35
echo "      $command"
 
36
eval $command 2>/dev/null | diff -bw ${SRCDIR}/form-solve-1d-P1.field - >/dev/null
 
37
if test $? -ne 0; then status=1; echo "        => *NO*"; fi
 
38
 
 
39
command="../bin/mkgeo_grid_1d 10 | ./form_solve_tst P2 -round - left right"
 
40
echo "      $command"
 
41
eval $command  2>/dev/null | diff -bw ${SRCDIR}/form-solve-1d-P2.field - >/dev/null
 
42
if test $? -ne 0; then status=1; echo "        => *NO*"; fi
 
43
 
 
44
command="./form_solve_tst P1 -I${GEODIR} carre-v2 top bottom left right -ndigit 5 "
 
45
echo "      $command"
 
46
eval $command 2>/dev/null | diff -bw ${SRCDIR}/form_solve.field - >/dev/null
 
47
if test $? -ne 0; then status=1; echo "        => *NO*"; fi
 
48
 
 
49
command="../bin/geo -upgrade -geo -I${GEODIR} box-T-3 | ./form_solve_tst P1 -name box-T-3 - top bottom left right foreground background -ndigit 5"
 
50
echo "      $command"
 
51
eval $command 2>/dev/null | diff -bw ${SRCDIR}/form_solve_3d.field - >/dev/null
 
52
if test $? -ne 0; then status=1; echo "        => *NO*"; fi
 
53
 
 
54
command="./form_solve_tst P2 -round -I${GEODIR} carre-v2 top bottom left right"
 
55
echo "      $command"
 
56
(eval $command > /dev/null) 2>&1 | grep u_ex | diff -bw ${SRCDIR}/form_solve_P2.valid - >/dev/null
 
57
if test $? -ne 0; then status=1; echo "        => *NO*"; fi
 
58
 
 
59
exit $status
 
60