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

# Source case functions
. "$WM_PROJECT_DIR/bin/tools/casesFunctions.sh"

latestTime=$(foamListTimes -functionEntries | tail -n1)
targetDirectory="validation/reference"
rm -rf "$targetDirectory"
mkdir -p "$targetDirectory"

# Copy results from latest run into reference directory
cp -f "postProcessing/graph/${latestTime}/line.csv" "${targetDirectory}"
cp -f "postProcessing/probes/0/U"        "${targetDirectory}"
cp -f "postProcessing/probes/0/p"        "${targetDirectory}"

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