diff src/Grids/equidistant_grid.jl @ 1464:37cf9f79caa4 feature/grids/boundary_indicies

Make boundary_indices for EquidistantGrid return a tuple to be more concistent with how TensorGrid will implement it
author Jonatan Werpers <jonatan@werpers.com>
date Wed, 29 Nov 2023 09:04:12 +0100
parents 05eb8ba149e2
children 553111a15506 d7bc11053951
line wrap: on
line diff
--- a/src/Grids/equidistant_grid.jl	Tue Nov 28 08:55:22 2023 +0100
+++ b/src/Grids/equidistant_grid.jl	Wed Nov 29 09:04:12 2023 +0100
@@ -51,8 +51,8 @@
 boundary_identifiers(::EquidistantGrid) = (Lower(), Upper())
 boundary_grid(g::EquidistantGrid, id::Lower) = ZeroDimGrid(g[begin])
 boundary_grid(g::EquidistantGrid, id::Upper) = ZeroDimGrid(g[end])
-boundary_indices(g::EquidistantGrid, id::Lower) = 1
-boundary_indices(g::EquidistantGrid, id::Upper) = length(g)
+boundary_indices(g::EquidistantGrid, id::Lower) = (1,)
+boundary_indices(g::EquidistantGrid, id::Upper) = (length(g),)
 
 """
     refine(g::EquidistantGrid, r::Int)