comparison src/Grids/grid.jl @ 1355:102ebdaf7c11 feature/variable_derivatives

Merge default
author Jonatan Werpers <jonatan@werpers.com>
date Wed, 08 Feb 2023 21:21:28 +0100
parents dfbd62c7eb09
children 5f677cd6f0b6
comparison
equal deleted inserted replaced
1210:fa0800591306 1355:102ebdaf7c11
1 """
2 Grid
3
4 Should implement
5 Base.ndims(grid::Grid)
6 points(grid::Grid)
7
8 """
9 abstract type Grid end
10 function points end
11
12 """
13 dims(grid::Grid)
14
15 A range containing the dimensions of `grid`
16 """
17 dims(grid::Grid) = 1:ndims(grid)
18
19 """
20 evalOn(grid::Grid, f::Function)
21
22 Evaluate function `f` on `grid`
23 """
24 function evalOn(grid::Grid, f::Function)
25 F(x) = f(x...)
26 return F.(points(grid))
27 end