changeset 1152:bda0afcf8e52 refactor/grids

REVIEW: Give input on TBD comments, suggest name change of evalOn.
author Vidar Stiernström <vidar.stiernstrom@it.uu.se>
date Thu, 20 Oct 2022 20:59:56 +0200
parents 31041ef8092a
children 50b008d2e937
files src/Grids/equidistant_grid.jl
diffstat 1 files changed, 6 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/Grids/equidistant_grid.jl	Wed Oct 19 23:23:36 2022 +0200
+++ b/src/Grids/equidistant_grid.jl	Thu Oct 20 20:59:56 2022 +0200
@@ -36,6 +36,8 @@
     return EquidistantGrid{length(size), eltype(limit_lower)}(size, limit_lower, limit_upper)
 end
 # TBD: Should it be an AbstractArray?
+# Review: Do we need it to be? It could be nice to have an iterator for a grid, but are there any other
+# functionalities we need? Adding two grids etc? If not, I suggest against subtyping AbstractArray.
 
 """
     EquidistantGrid{T}()
@@ -69,8 +71,11 @@
 
 Base.getindex(g::EquidistantGrid, I::CartesianIndex) = g[Tuple(I)...]
 # TBD: Can this method be removed if `EquidistantGrid` is an AbstractArray?
+# Review: See comment above.
 
-
+# Review: 
+# Is it not strange that evalOn(::Grid) is non-lazy while evalOn(::EquidistantGrid) is?
+# Also: Change name to evalon or eval_on!!!!!!
 function evalOn(grid::EquidistantGrid, f::Function)
     F(I...) = f(grid[I...]...)