Three-dimensional calculation of transonic viscous flows by an implicit method