#!/bin/sh
# Sample simulator to Dakota system call script
# See Advanced Simulation Code Interfaces chapter in Users Manual

# $1 is params.in FROM Dakota
# $2 is results.out returned to Dakota

# --------------
# PRE-PROCESSING
# --------------
# Incorporate the parameters from DAKOTA into the template, writing ros.in
# Use the following line if SNL's APREPRO utility is used instead of DPrePro.
# ../aprepro -c '*' -q --nowarning ros.template ros.in


#dprepro $1 U.template U.in
dprepro $1 constantProperties.template constantProperties.in

# --------
# ANALYSIS
# --------

pwd
cp -r ../casebase/* .
cp constantProperties.in TACOT-dakota/constantProperties

./Allrun_pato > /dev/null

# ---------------
# POST-PROCESSING
# ---------------

mv results/results $2
