SUMMARYA fast algorithm is presented for constructing continuous lines, made up of element sides, which pass once through each node of a general unstructured triangular mesh and which are generally aligned in prescribed directions. The lines are used as the basis of an adaptive fully implicit unstructured grid procedure for the solution of two-dimensional problems of steady compressible inviscid and laminar viscous high-speed flows, where the equation system is solved by line relaxation using a block tridiagonal equation solver. For three-dimensional laminar viscous simulations it is proposed to utilize an implicitlexplicit finite-element formulation. In the vicinity of solid walls a grid exhibiting structure in the normal direction is employed while, away from this region, the grid will be totally unstructured. In the structured region, lines in the normal direction to the wall are readily identified, while lines in the surfaces parallel to the solid wall are constructed using the proposed two-dimensional procedure. The implicit algorithm is then used in the structured region and the equation solution is achieved via line relaxation. An explicit form of the solution algorithm is used elsewhere. To illustrate the performance of the proposed method, solutions are obtained for both transonic inviscid and transonic and hypersonic laminar viscous problems in two dimensions. The application of the proposed procedure to the solution of three-dimensional hypersonic laminar viscous flow over a double ellipsoid configuration is also described.