Detection of Shock Waves from Shock-capturing Solutions