Add subgrids generation + check subgrid validity