@@ -13,7 +13,7 @@ Return the indices of the elements of the `domain` that intersect with the `geom
1313"""
1414indices (domain:: Domain , geometry:: Geometry ) = findall (intersects (geometry), domain)
1515
16- function indices (grid:: CartesianGrid , point:: Point )
16+ function indices (grid:: OrthoRegularGrid , point:: Point )
1717 point ∉ grid && return Int[]
1818
1919 # grid properties
@@ -31,7 +31,7 @@ function indices(grid::CartesianGrid, point::Point)
3131 [LinearIndices (dims)[coords... ]]
3232end
3333
34- function indices (grid:: CartesianGrid , chain:: Chain )
34+ function indices (grid:: OrthoRegularGrid , chain:: Chain )
3535 dims = size (grid)
3636 mask = falses (dims)
3737
@@ -43,7 +43,7 @@ function indices(grid::CartesianGrid, chain::Chain)
4343 LinearIndices (dims)[mask]
4444end
4545
46- function indices (grid:: CartesianGrid , poly:: Polygon )
46+ function indices (grid:: OrthoRegularGrid , poly:: Polygon )
4747 dims = size (grid)
4848 mask = zeros (Int, dims)
4949 cpoly = poly ∩ boundingbox (grid)
@@ -56,15 +56,15 @@ function indices(grid::CartesianGrid, poly::Polygon)
5656 LinearIndices (dims)[mask .> 0 ]
5757end
5858
59- function indices (grid:: CartesianGrid , box:: Box )
59+ function indices (grid:: OrthoRegularGrid , box:: Box )
6060 # cartesian range
6161 range = cartesianrange (grid, box)
6262
6363 # convert to linear indices
6464 LinearIndices (size (grid))[range] |> vec
6565end
6666
67- indices (grid:: CartesianGrid , multi:: Multi ) = mapreduce (geom -> indices (grid, geom), vcat, parent (multi)) |> unique
67+ indices (grid:: OrthoRegularGrid , multi:: Multi ) = mapreduce (geom -> indices (grid, geom), vcat, parent (multi)) |> unique
6868
6969function indices (grid:: RectilinearGrid , box:: Box )
7070 # cartesian range
@@ -89,7 +89,7 @@ _manifoldrange(::Type{<:𝔼}, grid::Grid, box::Box) = _euclideanrange(grid, box
8989
9090_manifoldrange (:: Type{<:🌐} , grid:: Grid , box:: Box ) = _geodesicrange (grid, box)
9191
92- function _euclideanrange (grid:: CartesianGrid , box:: Box )
92+ function _euclideanrange (grid:: OrthoRegularGrid , box:: Box )
9393 # grid properties
9494 or = minimum (grid)
9595 sp = spacing (grid)
0 commit comments