ENH: autoLayerDriver: better layering information message
[OpenFOAM-2.0.x.git] / tutorials / compressible / rhoCentralFoam / biconic25-55Run35 / sampleCone
blob450818c39c0efc42f98335a76cb602e416c39eff
1 #!/bin/sh
2 cd ${0%/*} || exit 1 # run from this directory
5 # FUNCTIONS
7 usage()
9 while [ "$#" -ge 1 ]; do echo "$1"; shift; done
11 cat<<USAGE
12 Usage: ${0##*/} [OPTION]
14 options:
15 -l -latestTime option for sample
16 -h help
18 Runs a set of samples across the cone face and concatenates output files
19 USAGE
20 exit 1
23 # -----------------------------------------------------------------------------
25 unset timeOpt
27 # parse options
28 while [ "$#" -gt 0 ]
30 case "$1" in
31 -h | -help)
32 usage
34 -l | -latestTime)
35 timeOpt="-latestTime"
36 shift
39 usage "unknown option/argument: '$*'"
41 esac
42 done
45 sample $timeOpt
46 SDIR=sets
47 LSDIR=`ls $SDIR | head -1`
48 EXAMPLE_FILE=`ls -1 $SDIR/${LSDIR}/* | head -1`
49 FS=`basename $EXAMPLE_FILE | cut -d_ -f2-`
51 for d in $SDIR/*
53 cat ${d}/cone25_${FS} ${d}/cone55_${FS} ${d}/base_${FS} > ${d}/biconic_${FS}
54 done
56 # ----------------------------------------------------------------- end-of-file