Mercurial > repos > public > sbplib_julia
comparison src/Grids/equidistant_grid.jl @ 1646:5f348cc5598e feature/grids/min_spacing
Add min_spacing function for grids
| author | Jonatan Werpers <jonatan@werpers.com> |
|---|---|
| date | Wed, 26 Jun 2024 11:30:38 +0200 |
| parents | b459082533f7 |
| children | 3714a391545a 51f0c5f895fb 74f051444e0e |
comparison
equal
deleted
inserted
replaced
| 1643:e551fe1fff14 | 1646:5f348cc5598e |
|---|---|
| 44 inverse_spacing(grid::EquidistantGrid) | 44 inverse_spacing(grid::EquidistantGrid) |
| 45 | 45 |
| 46 The reciprocal of the spacing between grid points. | 46 The reciprocal of the spacing between grid points. |
| 47 """ | 47 """ |
| 48 inverse_spacing(g::EquidistantGrid) = 1/step(g.points) | 48 inverse_spacing(g::EquidistantGrid) = 1/step(g.points) |
| 49 | |
| 50 min_spacing(g::EquidistantGrid) = spacing(g) | |
| 49 | 51 |
| 50 | 52 |
| 51 boundary_identifiers(::EquidistantGrid) = (Lower(), Upper()) | 53 boundary_identifiers(::EquidistantGrid) = (Lower(), Upper()) |
| 52 boundary_grid(g::EquidistantGrid, id::Lower) = ZeroDimGrid(g[begin]) | 54 boundary_grid(g::EquidistantGrid, id::Lower) = ZeroDimGrid(g[begin]) |
| 53 boundary_grid(g::EquidistantGrid, id::Upper) = ZeroDimGrid(g[end]) | 55 boundary_grid(g::EquidistantGrid, id::Upper) = ZeroDimGrid(g[end]) |
