Mercurial > repos > public > sbplib_julia
comparison src/Grids/equidistant_grid.jl @ 1595:611ae2308aa1 feature/boundary_conditions
Add orthogonal_grid
| author | Vidar Stiernström <vidar.stiernstrom@gmail.com> |
|---|---|
| date | Sun, 26 May 2024 17:35:52 -0700 |
| parents | efe1fc4cb6b0 |
| children | 3e7438e2a033 |
comparison
equal
deleted
inserted
replaced
| 1594:d68d02dd882f | 1595:611ae2308aa1 |
|---|---|
| 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 | 49 |
| 50 | |
| 51 boundary_identifiers(::EquidistantGrid) = (Lower(), Upper()) | 50 boundary_identifiers(::EquidistantGrid) = (Lower(), Upper()) |
| 52 boundary_grid(g::EquidistantGrid, id::Lower) = ZeroDimGrid(g[begin]) | 51 boundary_grid(g::EquidistantGrid, id::Lower) = ZeroDimGrid(g[begin]) |
| 53 boundary_grid(g::EquidistantGrid, id::Upper) = ZeroDimGrid(g[end]) | 52 boundary_grid(g::EquidistantGrid, id::Upper) = ZeroDimGrid(g[end]) |
| 54 boundary_indices(g::EquidistantGrid, id::Lower) = (1,) | 53 boundary_indices(g::EquidistantGrid, id::Lower) = (1,) |
| 55 boundary_indices(g::EquidistantGrid, id::Upper) = (length(g),) | 54 boundary_indices(g::EquidistantGrid, id::Upper) = (length(g),) |
| 55 orthogonal_grid(g::EquidistantGrid, id::Union{Lower,Upper}) = 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 |
