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

./Allrun.pre

runApplication decomposePar

runParallel $(getApplication)

runApplication reconstructPar

latestTime=$(foamListTimes -latestTime)

mv -f "$latestTime" "$latestTime".bak

mkdir old-processors-"$setup"

mv -f processor* old-processors-"$setup"

# runParallel -s decompose redistributePar -decompose -latestTime

runApplication -s "decompose" decomposePar -latestTime

runParallel -s 2 $(getApplication)

runApplication -s "reconstruct" reconstructPar -latestTime

runApplication -s "columnAverage" postProcess -func columnAverage -latestTime
runApplication -s "UMean" postProcess -func sampleUMean -latestTime
runApplication -s "UPrime2Mean" postProcess -func sampleUPrime2Mean -latestTime
runApplication -s "TMean" postProcess -func sampleTMean -latestTime
runApplication -s "TPrime2Mean" postProcess -func sampleTPrime2Mean -latestTime

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