comparison src/Grids/equidistant_grid.jl @ 1830:805b9b7fcc39 refactor/grids/iterable_boundary_indices

Make tests pass for EquidistantGrid
author Jonatan Werpers <jonatan@werpers.com>
date Sun, 20 Oct 2024 21:44:21 +0200
parents 871f3f1decea
children 516eaabf1169
comparison
equal deleted inserted replaced
1829:871f3f1decea 1830:805b9b7fcc39
69 69
70 70
71 boundary_identifiers(::EquidistantGrid) = (LowerBoundary(), UpperBoundary()) 71 boundary_identifiers(::EquidistantGrid) = (LowerBoundary(), UpperBoundary())
72 boundary_grid(g::EquidistantGrid, id::LowerBoundary) = ZeroDimGrid(g[begin]) 72 boundary_grid(g::EquidistantGrid, id::LowerBoundary) = ZeroDimGrid(g[begin])
73 boundary_grid(g::EquidistantGrid, id::UpperBoundary) = ZeroDimGrid(g[end]) 73 boundary_grid(g::EquidistantGrid, id::UpperBoundary) = ZeroDimGrid(g[end])
74 boundary_indices(g::EquidistantGrid, id::LowerBoundary) = (firstindex(g),) 74 boundary_indices(g::EquidistantGrid, id::LowerBoundary) = firstindex(g)
75 boundary_indices(g::EquidistantGrid, id::UpperBoundary) = (lastindex(g),) 75 boundary_indices(g::EquidistantGrid, id::UpperBoundary) = lastindex(g)
76 76
77 """ 77 """
78 refine(g::EquidistantGrid, r::Int) 78 refine(g::EquidistantGrid, r::Int)
79 79
80 The grid where `g` is refined by the factor `r`. The factor is applied to the number of 80 The grid where `g` is refined by the factor `r`. The factor is applied to the number of