#!/bin/sh cd "${0%/*}" || exit # Run from this directory #------------------------------------------------------------------------------ # settings # operand setups setups=" kEpsilon-nutkWallFunction LaunderSharmaKE-nutkWallFunction " #------------------------------------------------------------------------------ plot_yPlus_vs_uPlus() { setup="$1" sampleFile="results/$setup/yPlus_vs_uPlus.xy" image="plots/$setup/yPlus_vs_uPlus.png" gnuplot</dev/null || { echo "gnuplot not found - skipping graph creation" 1>&2 exit 1 } # Check directory: "results" [ -d "results" ] || { echo "No results directory found - skipping graph creation" 1>&2 exit 1 } #------------------------------------------------------------------------------ for setup in $setups do echo "" echo "# Plots for the setup: $setup" echo "" dirPlots="plots/$setup" [ -d "$dirPlots" ] || mkdir -p "$dirPlots" plot_yPlus_vs_uPlus "$setup" done #------------------------------------------------------------------------------