Mercurial > repos > public > sbplib_julia
comparison 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 |
comparison
equal
deleted
inserted
replaced
1461:455e6b4c8b02 | 1462:05eb8ba149e2 |
---|---|
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 | 54 boundary_indices(g::EquidistantGrid, id::Lower) = 1 |
55 boundary_indices(g::EquidistantGrid, id::Upper) = length(g) | |
55 | 56 |
56 """ | 57 """ |
57 refine(g::EquidistantGrid, r::Int) | 58 refine(g::EquidistantGrid, r::Int) |
58 | 59 |
59 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 |