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

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

# Copy propeller surfaces from resources directory
cp $FOAM_TUTORIALS/resources/geometry/propeller*.obj.gz constant/geometry/

# Mesh in parallel
runApplication blockMesh
runApplication surfaceFeatures
runApplication decomposePar -noFields
runParallel snappyHexMesh -overwrite

# Create the sliding patches
runParallel createBaffles -overwrite
runParallel splitBaffles -overwrite

# Renumber
runParallel renumberMesh -noFields -overwrite

# Create non-conformal couples
runParallel createNonConformalCouples -overwrite nonCouple1 nonCouple2

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