A numerical method for three-dimensional viscous flow: Application to the hypersonic leading edge