diff src/Grids/grid.jl @ 1234:8806f4cd6fee refactor/grids

Move ZeroDimGrid to its own file
author Jonatan Werpers <jonatan@werpers.com>
date Sun, 19 Feb 2023 22:20:44 +0100
parents 3924c1f6ec6d
children 917cb8acbc17
line wrap: on
line diff
--- a/src/Grids/grid.jl	Sun Feb 19 22:20:25 2023 +0100
+++ b/src/Grids/grid.jl	Sun Feb 19 22:20:44 2023 +0100
@@ -55,20 +55,3 @@
 # Should it be lazy? Could it be a view?
 function getcomponent(gfun, I::Vararg{Int}) end
 # function getcomponent(gfun, s::Symbol) end ?
-
-# TBD: New file zero_dim_grid.jl?
-struct ZeroDimGrid{T,S,RD} <: Grid{T,0,RD}
-    p::S
-
-    function ZeroDimGrid(p)
-        T = eltype(p)
-        S = typeof(p)
-        RD = length(p)
-        return new{T,S,RD}(p)
-    end
-end
-
-Base.size(g::ZeroDimGrid) = ()
-Base.getindex(g::ZeroDimGrid) = g.p
-Base.eachindex(g::ZeroDimGrid) = CartesianIndices(())
-