@@ -13,7 +13,7 @@ Return the indices of the elements of the `domain` that intersect with the `geom
13
13
"""
14
14
indices (domain:: Domain , geometry:: Geometry ) = findall (intersects (geometry), domain)
15
15
16
- function indices (grid:: CartesianGrid , point:: Point )
16
+ function indices (grid:: OrthoRegularGrid , point:: Point )
17
17
point ∉ grid && return Int[]
18
18
19
19
# grid properties
@@ -31,7 +31,7 @@ function indices(grid::CartesianGrid, point::Point)
31
31
[LinearIndices (dims)[coords... ]]
32
32
end
33
33
34
- function indices (grid:: CartesianGrid , chain:: Chain )
34
+ function indices (grid:: OrthoRegularGrid , chain:: Chain )
35
35
dims = size (grid)
36
36
mask = falses (dims)
37
37
@@ -43,7 +43,7 @@ function indices(grid::CartesianGrid, chain::Chain)
43
43
LinearIndices (dims)[mask]
44
44
end
45
45
46
- function indices (grid:: CartesianGrid , poly:: Polygon )
46
+ function indices (grid:: OrthoRegularGrid , poly:: Polygon )
47
47
dims = size (grid)
48
48
mask = zeros (Int, dims)
49
49
cpoly = poly ∩ boundingbox (grid)
@@ -56,15 +56,15 @@ function indices(grid::CartesianGrid, poly::Polygon)
56
56
LinearIndices (dims)[mask .> 0 ]
57
57
end
58
58
59
- function indices (grid:: CartesianGrid , box:: Box )
59
+ function indices (grid:: OrthoRegularGrid , box:: Box )
60
60
# cartesian range
61
61
range = cartesianrange (grid, box)
62
62
63
63
# convert to linear indices
64
64
LinearIndices (size (grid))[range] |> vec
65
65
end
66
66
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
68
68
69
69
function indices (grid:: RectilinearGrid , box:: Box )
70
70
# cartesian range
@@ -89,7 +89,7 @@ _manifoldrange(::Type{<:𝔼}, grid::Grid, box::Box) = _euclideanrange(grid, box
89
89
90
90
_manifoldrange (:: Type{<:🌐} , grid:: Grid , box:: Box ) = _geodesicrange (grid, box)
91
91
92
- function _euclideanrange (grid:: CartesianGrid , box:: Box )
92
+ function _euclideanrange (grid:: OrthoRegularGrid , box:: Box )
93
93
# grid properties
94
94
or = minimum (grid)
95
95
sp = spacing (grid)
0 commit comments