The search for the temperature disturbance causing transition between regular and Mach reflections in the dual solution domain is addressed in an optimization statement. The gradient of the discrepancy between the current and target flow fields was calculated using adjoint equations. The control was determined by gradient-based optimization. The flow field simulation is verified via a posteriori error estimates using the solution of an additional adjoint problem. Copyright © 2012 John Wiley & Sons, Ltd.