Mercurial > repos > public > sbplib_julia
comparison 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 |
comparison
equal
deleted
inserted
replaced
1825:98ae79eb0709 | 1826:b0c019acb50b |
---|---|
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 |