Gradient projection method