On regular shock refraction in hydro- and ideal magnetohydrodynamics door