Calibration and Optimization of Computer Models with Applications to Acoustics and Materials Discovery