Mercurial > repos > public > sbplib_julia
diff src/Grids/equidistant_grid.jl @ 1462:05eb8ba149e2 feature/grids/boundary_indicies
Implement boundary_indices for EquidistantGrid
author | Jonatan Werpers <jonatan@werpers.com> |
---|---|
date | Tue, 28 Nov 2023 08:51:58 +0100 |
parents | e3a80ef08d09 |
children | 37cf9f79caa4 |
line wrap: on
line diff
--- a/src/Grids/equidistant_grid.jl Tue Nov 28 08:42:00 2023 +0100 +++ b/src/Grids/equidistant_grid.jl Tue Nov 28 08:51:58 2023 +0100 @@ -51,7 +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) """ refine(g::EquidistantGrid, r::Int)