Mercurial > repos > public > sbplib_julia
changeset 1242:917cb8acbc17 refactor/grids
Remove AbstractArray subtyping for Grid for now
author | Jonatan Werpers <jonatan@werpers.com> |
---|---|
date | Tue, 21 Feb 2023 21:13:37 +0100 |
parents | 5096102fe053 |
children | 783284b3e438 |
files | src/Grids/grid.jl |
diffstat | 1 files changed, 2 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
diff -r 5096102fe053 -r 917cb8acbc17 src/Grids/grid.jl --- a/src/Grids/grid.jl Tue Feb 21 21:07:39 2023 +0100 +++ b/src/Grids/grid.jl Tue Feb 21 21:13:37 2023 +0100 @@ -6,14 +6,8 @@ Should implement # TBD: """ -#TBD: Does all the kinds of grids we want fit with this interface? -# Multigrid? -# Unstructured? -# Triangular structured grids? -# Non-simply connected? -# -# Maybe it shouldn't be an abstract array after all? -abstract type Grid{T,D,RD} <: AbstractArray{T,D} end +#TBD: Should it be an AbstractArray? See notes in grid_refactor.md +abstract type Grid{T,D,RD} end Base.ndims(::Grid{T,D,RD}) where {T,D,RD} = D # nidms borde nog vara antalet index som används för att indexera nätet. Snarare än vilken dimension nätet har (tänk ostrukturerat)