diff src/Grids/tensor_grid.jl @ 1416:031514327289 feature/boundary_conditions

Merge with default
author Vidar Stiernström <vidar.stiernstrom@it.uu.se>
date Tue, 22 Aug 2023 22:44:42 +0200
parents 4d628c83987e
children 60857d8338cb
line wrap: on
line diff
--- a/src/Grids/tensor_grid.jl	Tue Aug 22 21:53:05 2023 +0200
+++ b/src/Grids/tensor_grid.jl	Tue Aug 22 22:44:42 2023 +0200
@@ -17,7 +17,7 @@
 end
 
 # Indexing interface
-function Base.getindex(g::TensorGrid, I...)
+function Base.getindex(g::TensorGrid, I::Vararg{Int})
     szs = ndims.(g.grids)
 
     Is = LazyTensors.split_tuple(I, szs)
@@ -26,8 +26,6 @@
     return vcat(ps...)
 end
 
-Base.getindex(g::TensorGrid, I::CartesianIndex) = g[Tuple(I)...]
-
 function Base.eachindex(g::TensorGrid)
     szs = LazyTensors.concatenate_tuples(size.(g.grids)...)
     return CartesianIndices(szs)