#!/bin/sh
cd ${0%/*} || exit 1    # run from this directory

# Source tutorial run functions
. $WM_PROJECT_DIR/bin/tools/RunFunctions

# Get application name
application=`getApplication`

runStarToFoam()
{
    if [ -f log.star3ToFoam -o -f log.starToFoam ]
    then
        echo "star3ToFoam already run on $PWD: remove log file to re-run"
    else
        echo "star3ToFoam: converting mesh $1"
        star3ToFoam $1 > log.star3ToFoam 2>&1
    fi
}

runStarToFoam prostar/nacaAirfoil
mv constant/polyMesh/boundary temp
sed -e s/"\([\t ]*type[\t ]*\)symmetryPlane"/"\1empty"/g \
    temp > constant/polyMesh/boundary
rm temp
runApplication $application

# end-of-file

# ----------------------------------------------------------------- end-of-file
