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

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

#runApplication reconstructParMesh -mergeTol 1E-06 -constant # v7
runApplication reconstructParMesh -constant # v9


# Reconstruct mesh for a simulation that has not yet been run
#runApplication reconstructPar -constant

# Reconstruct mesh for a simulation that has been run
runApplication reconstructPar -latestTime -withZero -constant

if [ "$(isReconstructed)" = "true" ]
then
    rm -rf processor*
fi

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