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

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

runApplication blockMesh

runApplication datToFoam grid256.dat

CONST="constant"
cat $CONST/pointsHeader $CONST/points.tmp > $CONST/polyMesh/points
runApplication collapseEdges -overwrite

echo "Changing patch type to wedge type in boundary file"
mv $CONST/polyMesh/boundary $CONST/polyMesh/boundary.bak
sed -f $CONST/wedgeScr $CONST/polyMesh/boundary.bak > $CONST/polyMesh/boundary
rm $CONST/polyMesh/boundary.bak

runApplication `getApplication`


#------------------------------------------------------------------------------
