Mercurial > repos > public > sbplib_julia
diff src/Grids/equidistant_grid.jl @ 1826:b0c019acb50b refactor/grids/iterable_boundary_indices
Change implementation for EquidistantGrid
author | Jonatan Werpers <jonatan@werpers.com> |
---|---|
date | Tue, 17 Sep 2024 09:12:52 +0200 |
parents | b459082533f7 |
children | 871f3f1decea |
line wrap: on
line diff
--- a/src/Grids/equidistant_grid.jl Tue Sep 17 09:12:36 2024 +0200 +++ b/src/Grids/equidistant_grid.jl Tue Sep 17 09:12:52 2024 +0200 @@ -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)