Mercurial > repos > public > sbplib_julia
comparison 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 |
comparison
equal
deleted
inserted
replaced
| 1463:4ad1282f8bab | 1464:37cf9f79caa4 |
|---|---|
| 49 | 49 |
| 50 | 50 |
| 51 boundary_identifiers(::EquidistantGrid) = (Lower(), Upper()) | 51 boundary_identifiers(::EquidistantGrid) = (Lower(), Upper()) |
| 52 boundary_grid(g::EquidistantGrid, id::Lower) = ZeroDimGrid(g[begin]) | 52 boundary_grid(g::EquidistantGrid, id::Lower) = ZeroDimGrid(g[begin]) |
| 53 boundary_grid(g::EquidistantGrid, id::Upper) = ZeroDimGrid(g[end]) | 53 boundary_grid(g::EquidistantGrid, id::Upper) = ZeroDimGrid(g[end]) |
| 54 boundary_indices(g::EquidistantGrid, id::Lower) = 1 | 54 boundary_indices(g::EquidistantGrid, id::Lower) = (1,) |
| 55 boundary_indices(g::EquidistantGrid, id::Upper) = length(g) | 55 boundary_indices(g::EquidistantGrid, id::Upper) = (length(g),) |
| 56 | 56 |
| 57 """ | 57 """ |
| 58 refine(g::EquidistantGrid, r::Int) | 58 refine(g::EquidistantGrid, r::Int) |
| 59 | 59 |
| 60 The grid where `g` is refined by the factor `r`. The factor is applied to the number of | 60 The grid where `g` is refined by the factor `r`. The factor is applied to the number of |
