#!/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 decomposePar
runParallel    foamRun
runApplication reconstructPar

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

# Compare to reference solution
case=$(basename "$PWD")
mpytest --suffix "${case}" almostequal validation/reference/probes/0/divPhi \
    postProcessing/probes/0/divPhi

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