Restrict the grids using the geometry, where available.