Mercurial > repos > public > sbplib_julia
comparison src/Grids/mapped_grid.jl @ 1650:8250cf5a3ce9 feature/grids/manifolds
Merge feature/grids/curvilinear
| author | Jonatan Werpers <jonatan@werpers.com> |
|---|---|
| date | Wed, 26 Jun 2024 12:42:28 +0200 |
| parents | d4a6f9effcdd 64452a678e7a |
| children | 6d196fb85133 |
comparison
equal
deleted
inserted
replaced
| 1644:e213bd857f3f | 1650:8250cf5a3ce9 |
|---|---|
| 12 Base.getindex(g::MappedGrid, I::Vararg{Int}) = g.physicalcoordinates[I...] | 12 Base.getindex(g::MappedGrid, I::Vararg{Int}) = g.physicalcoordinates[I...] |
| 13 Base.eachindex(g::MappedGrid) = eachindex(g.logicalgrid) | 13 Base.eachindex(g::MappedGrid) = eachindex(g.logicalgrid) |
| 14 | 14 |
| 15 Base.firstindex(g::MappedGrid, d) = firstindex(g.logicalgrid, d) | 15 Base.firstindex(g::MappedGrid, d) = firstindex(g.logicalgrid, d) |
| 16 Base.lastindex(g::MappedGrid, d) = lastindex(g.logicalgrid, d) | 16 Base.lastindex(g::MappedGrid, d) = lastindex(g.logicalgrid, d) |
| 17 # TODO: axes(...)? | |
| 17 | 18 |
| 18 # Iteration interface | 19 # Iteration interface |
| 19 | 20 |
| 20 Base.iterate(g::MappedGrid) = iterate(g.physicalcoordinates) | 21 Base.iterate(g::MappedGrid) = iterate(g.physicalcoordinates) |
| 21 Base.iterate(g::MappedGrid, state) = iterate(g.physicalcoordinates, state) | 22 Base.iterate(g::MappedGrid, state) = iterate(g.physicalcoordinates, state) |
