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

# Source run functions
. $WM_PROJECT_SITE/$WM_PROJECT_VERSION/bin/tools/RunFunctions

runApplication blockMesh
runApplication foamRun

latestTime=$(foamListTimes -latestTime)
cp "validation/U.water.gz" "${latestTime}/U.water.ref.gz"
runApplication foamPostProcess \
    -func "deviation(field=U.water, reference=U.water.ref, maxAbsDev=1e-12)" \
    -latestTime

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