#!/bin/sh
cd "${0%/*}" || exit                                # Run from this directory
. ${WM_PROJECT_DIR:?}/bin/tools/RunFunctions        # Tutorial run functions
#------------------------------------------------------------------------------

m4 system/blockMeshDict.m4 > system/blockMeshDict
runApplication blockMesh

runApplication topoSet

runApplication snappyHexMesh -overwrite

runApplication extrudeToRegionMesh -overwrite

runApplication decomposePar
rm log.decomposePar
runApplication decomposePar -region panelRegion

runParallel $(getApplication)

paraFoam -touch
paraFoam -touch -region panelRegion

if notTest "$@"
then
    (cd validation && ./createGraphs)
fi

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