This repository has been archived on 2023-11-20. You can view files and clone it, but cannot push or open issues or pull requests.
foam-extend4.1-coherent-io/tutorials/rhoCentralFoam/biconic25-55Run35/sampleCone

44 lines
773 B
Text
Raw Normal View History

#!/bin/sh
#
# FUNCTIONS
#
printUsage () {
cat <<EOF
Usage: $0 [options]
Runs a set of samples across the cone face and concatenates output files
Options are:
-l -latestTime option for sample
-h help
EOF
}
LATEST_TIME=""
OPTS=`getopt hl $*`
if [ $? -ne 0 ] ; then
echo "Aborting due to invalid option"
printUsage
exit 1
fi
eval set -- "$OPTS"
while [ $1 != -- ]; do
case $1 in
-l) LATEST_TIME="-latestTime";;
-h) printUsage; exit 1;;
esac
shift
done
shift
sample ${LATEST_TIME}
SDIR="sets"
LSDIR=`ls $SDIR | head -1`
EXAMPLE_FILE=`ls -1 $SDIR/${LSDIR}/* | head -1`
FS=`basename $EXAMPLE_FILE | cut -d_ -f2-`
for d in $SDIR/*
do
cat ${d}/cone25_${FS} ${d}/cone55_${FS} ${d}/base_${FS} > ${d}/biconic_${FS}
done