Added flag for adaptive grid.