Gradient discretization method