Mercurial > repos > public > sbplib_julia
comparison src/Grids/mapped_grid.jl @ 1703:6eb5b48607e0 feature/grids/curvilinear
Add test for axes(::MappedGrid)
author | Jonatan Werpers <jonatan@werpers.com> |
---|---|
date | Wed, 04 Sep 2024 07:59:24 +0200 |
parents | 72776d3d5fd6 |
children | e5e76c8e52c5 |
comparison
equal
deleted
inserted
replaced
1702:ff7aeda1b292 | 1703:6eb5b48607e0 |
---|---|
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(...)? | |
18 | 17 |
19 # Iteration interface | 18 # Iteration interface |
20 | 19 |
21 Base.iterate(g::MappedGrid) = iterate(g.physicalcoordinates) | 20 Base.iterate(g::MappedGrid) = iterate(g.physicalcoordinates) |
22 Base.iterate(g::MappedGrid, state) = iterate(g.physicalcoordinates, state) | 21 Base.iterate(g::MappedGrid, state) = iterate(g.physicalcoordinates, state) |