run_coupled_nek.sh 486 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
#!/usr/bin/env bash

# Runs MOON driver for this example directory. Requires the -i <input.i> flag
# for the MOOSE config file

INPUT_FILE=""
while getopts "i:" opt; do
  case $opt in
    i ) INPUT_FILE=$OPTARG ;;
  esac
done

if [ -z "$INPUT_FILE" ]; then
  echo "Error: Must provide -i <input_file.i> option"
  exit 1;
fi

rm -f *.sch
19
echo "$(basename $(pwd))" > SESSION.NAME && pwd >> SESSION.NAME
20 21 22
CMD="./$(basename $(pwd))-opt -i $INPUT_FILE"
echo "Running \"$CMD\"..."
eval "$CMD"