#!/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

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

# Compare to reference solution
case=$(basename "$PWD")
latestTime=$(foamListTimes -latestTime)
mpytest --suffix "${case}" almostequal --decimal 3 \
    postProcessing/graph/"${latestTime}"/line.csv \
    validation/postProcessing/graph/4/line.csv

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