#!/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 setFields
runApplication foamRun

# Create graphs
( cd validation && ./createGraphs )

# Compare to reference solution
case=$(basename "$PWD")
runCommand --suffix "${case}" -- diff -bs \
    validation/surfaceFieldValue.dat \
    postProcessing/inletVelocity/0/surfaceFieldValue.dat

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