2007-11-14 04:03:56 +08:00
|
|
|
#!/bin/sh
|
2006-09-28 05:55:15 +08:00
|
|
|
#BHEADER**********************************************************************
|
2007-11-14 04:03:56 +08:00
|
|
|
# Copyright (c) 2007, Lawrence Livermore National Security, LLC.
|
2006-09-28 05:55:15 +08:00
|
|
|
# Produced at the Lawrence Livermore National Laboratory.
|
|
|
|
|
# Written by the HYPRE team. UCRL-CODE-222953.
|
|
|
|
|
# All rights reserved.
|
|
|
|
|
#
|
|
|
|
|
# This file is part of HYPRE (see http://www.llnl.gov/CASC/hypre/).
|
|
|
|
|
# Please see the COPYRIGHT_and_LICENSE file for the copyright notice,
|
|
|
|
|
# disclaimer, contact information and the GNU Lesser General Public License.
|
|
|
|
|
#
|
|
|
|
|
# HYPRE 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) version 2.1 dated February 1999.
|
|
|
|
|
#
|
|
|
|
|
# HYPRE 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 terms and conditions of the GNU General
|
|
|
|
|
# Public License for more details.
|
|
|
|
|
#
|
|
|
|
|
# You should have received a copy of the GNU Lesser General Public License
|
|
|
|
|
# along with this program; if not, write to the Free Software Foundation,
|
|
|
|
|
# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
|
|
|
#
|
|
|
|
|
# $Revision$
|
|
|
|
|
#EHEADER**********************************************************************
|
|
|
|
|
|
2007-11-14 04:03:56 +08:00
|
|
|
|
2006-11-14 05:55:11 +08:00
|
|
|
TNAME=`basename $0 .sh`
|
|
|
|
|
|
2004-10-13 23:59:38 +08:00
|
|
|
#=============================================================================
|
|
|
|
|
# sstruct: Tests the struct solvers called from the sstruct interface
|
|
|
|
|
#=============================================================================
|
|
|
|
|
|
2006-11-14 05:55:11 +08:00
|
|
|
tail -3 ${TNAME}.out.0 > ${TNAME}.testdata
|
|
|
|
|
tail -3 ${TNAME}.out.200 > ${TNAME}.testdata.temp
|
|
|
|
|
diff ${TNAME}.testdata ${TNAME}.testdata.temp >&2
|
2004-10-13 23:59:38 +08:00
|
|
|
|
2006-11-14 05:55:11 +08:00
|
|
|
#=============================================================================
|
2006-10-19 01:35:54 +08:00
|
|
|
|
2006-11-14 05:55:11 +08:00
|
|
|
tail -3 ${TNAME}.out.1 > ${TNAME}.testdata
|
|
|
|
|
tail -3 ${TNAME}.out.201 > ${TNAME}.testdata.temp
|
|
|
|
|
diff ${TNAME}.testdata ${TNAME}.testdata.temp >&2
|
2004-10-13 23:59:38 +08:00
|
|
|
|
2006-10-19 01:35:54 +08:00
|
|
|
#=============================================================================
|
2006-11-14 05:55:11 +08:00
|
|
|
# compare with baseline case
|
2006-10-19 01:35:54 +08:00
|
|
|
#=============================================================================
|
2006-11-14 05:55:11 +08:00
|
|
|
|
|
|
|
|
FILES="\
|
|
|
|
|
${TNAME}.out.0\
|
|
|
|
|
${TNAME}.out.1\
|
|
|
|
|
${TNAME}.out.200\
|
|
|
|
|
${TNAME}.out.201\
|
|
|
|
|
"
|
|
|
|
|
|
|
|
|
|
for i in $FILES
|
|
|
|
|
do
|
|
|
|
|
echo "# Output file: $i"
|
|
|
|
|
tail -3 $i
|
|
|
|
|
done > ${TNAME}.out
|
|
|
|
|
|
|
|
|
|
if [ -z $HYPRE_NO_SAVED ]; then
|
|
|
|
|
diff -U3 -bI"time" ${TNAME}.saved ${TNAME}.out >&2
|
|
|
|
|
fi
|
2006-10-19 01:35:54 +08:00
|
|
|
|
|
|
|
|
#=============================================================================
|
|
|
|
|
# remove temporary files
|
|
|
|
|
#=============================================================================
|
2006-11-14 05:55:11 +08:00
|
|
|
|
|
|
|
|
rm -f ${TNAME}.testdata*
|