An iterative scheme for determining glacier velocities and stresses