CTH: A three-dimensional shock wave physics code