initial commit for version 1.6.x patch release
[OpenFOAM-1.6.x.git] / tutorials / compressible / rhoCentralFoam / biconic25-55Run35 / sampleCone
blob29a4f5a3e29a298bb0c0bcadf9c0f7a540d460aa
1 #!/bin/sh
4 # FUNCTIONS
6 printUsage () {
7 cat <<EOF
8 Usage: $0 [options]
9 Runs a set of samples across the cone face and concatenates output files
11 Options are:
12 -l -latestTime option for sample
13 -h help
14 EOF
17 LATEST_TIME=""
19 OPTS=`getopt hl $*`
20 if [ $? -ne 0 ] ; then
21 echo "Aborting due to invalid option"
22 printUsage
23 exit 1
25 eval set -- "$OPTS"
26 while [ $1 != -- ]; do
27 case $1 in
28 -l) LATEST_TIME="-latestTime";;
29 -h) printUsage; exit 1;;
30 esac
31 shift
32 done
33 shift
35 sample ${LATEST_TIME}
36 SDIR="sets"
37 LSDIR=`ls $SDIR | head -1`
38 EXAMPLE_FILE=`ls -1 $SDIR/${LSDIR}/* | head -1`
39 FS=`basename $EXAMPLE_FILE | cut -d_ -f2-`
40 for d in $SDIR/*
42 cat ${d}/cone25_${FS} ${d}/cone55_${FS} ${d}/base_${FS} > ${d}/biconic_${FS}
43 done