grid discretization