Mercurial > repos > public > sbplib_julia
comparison src/Grids/grid.jl @ 1501:553111a15506 feature/grids/curvilinear
Add some TBDs and TODOs
author | Jonatan Werpers <jonatan@werpers.com> |
---|---|
date | Fri, 16 Feb 2024 10:28:02 +0100 |
parents | 62f9d0387a2a |
children | 4df668d00d03 |
comparison
equal
deleted
inserted
replaced
1496:ae2dbfb984a9 | 1501:553111a15506 |
---|---|
130 eval_on(g::Grid, f) = eval_on(g, f, Base.IteratorSize(g)) | 130 eval_on(g::Grid, f) = eval_on(g, f, Base.IteratorSize(g)) |
131 function eval_on(g::Grid, f, ::Base.HasShape) | 131 function eval_on(g::Grid, f, ::Base.HasShape) |
132 if hasmethod(f, (Any,)) | 132 if hasmethod(f, (Any,)) |
133 return LazyTensors.LazyFunctionArray((I...)->f(g[I...]), size(g)) | 133 return LazyTensors.LazyFunctionArray((I...)->f(g[I...]), size(g)) |
134 else | 134 else |
135 # TBD This branch can be removed if we accept the trade off that we define f with the syntax f((x,y)) instead if we don't want to handle the vector in the body of f. (Add an example in the docs) | |
135 return LazyTensors.LazyFunctionArray((I...)->f(g[I...]...), size(g)) | 136 return LazyTensors.LazyFunctionArray((I...)->f(g[I...]...), size(g)) |
136 end | 137 end |
137 end | 138 end |
138 | 139 |
139 """ | 140 """ |