comparison src/Grids/grid.jl @ 1557:9113f437431d feature/grids/curvilinear

Merge default
author Jonatan Werpers <jonatan@werpers.com>
date Sat, 13 Apr 2024 23:52:40 +0200
parents 4df668d00d03 d641798539c2
children e213bd857f3f b02917bcd7d5
comparison
equal deleted inserted replaced
1527:69790e9d1652 1557:9113f437431d
140 function eval_on(g::Grid, f, ::Base.HasShape) 140 function eval_on(g::Grid, f, ::Base.HasShape)
141 if hasmethod(f, (Any,)) 141 if hasmethod(f, (Any,))
142 return LazyTensors.LazyFunctionArray((I...)->f(g[I...]), size(g)) 142 return LazyTensors.LazyFunctionArray((I...)->f(g[I...]), size(g))
143 else 143 else
144 # 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) 144 # 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)
145 # Also see Notes.md
145 return LazyTensors.LazyFunctionArray((I...)->f(g[I...]...), size(g)) 146 return LazyTensors.LazyFunctionArray((I...)->f(g[I...]...), size(g))
146 end 147 end
147 end 148 end
148 149
149 """ 150 """