Add optional z argument to Grid.intersect() method. By default it would be
cellid = modelgrid.intersect(x, y, z=None),
which would return (i, j) for StructuredGrid, (cell2d) for VertexGrid, and None for UnstructuredGrid. This is what the current .intersect() method does. And if z != None is passed it would be
cellid = modelgrid.intersect(x, y, z=z)
which would return (k, i, j) for StructuredGrid, (k, cell2d) for VertexGrid, and (node) for UnstructuredGrid.
Adding z would make it possible to implement the .intersect() method for UnstructuredGrid.
Discussion started based on PR #1205
Add optional
zargument toGrid.intersect()method. By default it would bewhich would return
(i, j)forStructuredGrid,(cell2d)forVertexGrid, andNoneforUnstructuredGrid. This is what the current.intersect()method does. And ifz != Noneis passed it would bewhich would return
(k, i, j)forStructuredGrid,(k, cell2d)forVertexGrid, and(node)forUnstructuredGrid.Adding
zwould make it possible to implement the.intersect()method forUnstructuredGrid.Discussion started based on PR #1205