Newer
Older
Andrew Heather
committed
#!/bin/sh
cd ${0%/*} || exit 1 # run from this directory
# Source tutorial run functions
. $WM_PROJECT_DIR/bin/tools/RunFunctions
eulerianCase=../eulerianInjection
Andrew Heather
committed
dir=$1
latestTime=$(\cd $dir && foamListTimes -latestTime)
Andrew Heather
committed
then
Andrew Heather
committed
then
# Try a processor directory
latestTime=$(\cd $dir && foamListTimes -latestTime -processor)
if [ -n $latestTime ]
then
dir="${dir}/processor0"
fi
Andrew Heather
committed
fi
fi
Andrew Heather
committed
then
echo "Error: unable to find Lagrangian data in case $eulerianCase"
exit 1
fi
dir=$dir/${latestTime}/lagrangian
if [ -d $dir ]
then
echo "Copying lagrangian data from $dir to 0 directory"
\cp -r $dir 0
else
echo "Error: unable to find Lagrangian data in case $dir"
fi
Andrew Heather
committed
}
restore0Dir;
copyLagrangianData ${eulerianCase}
runApplication blockMesh
runApplication decomposePar
runParallel $(getApplication)
runApplication reconstructPar