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

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

runApplication surfaceTransformPoints \
    "translate=(-0.586 0 -0.156), \
    Ry=-3.485, \
    translate=(0.586 0 0.156)" \
    constant/geometry/w3_orig.stl constant/geometry/w3.stl

runApplication surfaceFeatures

runApplication blockMesh -dict system/blockMeshDict.2

for i in 1 2 3 4
do
    runApplication -a foamDictionary system/refineMeshDict -entry set -set c${i}
    runApplication -a topoSet -dict system/topoSetDict.2
    runApplication -a refineMesh -dict system/refineMeshDict -overwrite
done

runApplication snappyHexMesh -dict system/snappyHexMeshDict.2 -overwrite

runApplication renumberMesh -noFields -overwrite

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