Mercurial > repos > public > sbplib_julia
view src/Grids/grid.jl @ 1158:c94a12327737 refactor/sbpoperators/inflation
Disregard review comments about multi-d tests.
After discussion on Discord we concluded that removing multi-d tests for volume operators would
make them too implementation dependent.
| author | Jonatan Werpers <jonatan@werpers.com> |
|---|---|
| date | Tue, 29 Nov 2022 21:46:54 +0100 |
| parents | dfbd62c7eb09 |
| children | 5f677cd6f0b6 |
line wrap: on
line source
""" Grid Should implement Base.ndims(grid::Grid) points(grid::Grid) """ abstract type Grid end function points end """ dims(grid::Grid) A range containing the dimensions of `grid` """ dims(grid::Grid) = 1:ndims(grid) """ evalOn(grid::Grid, f::Function) Evaluate function `f` on `grid` """ function evalOn(grid::Grid, f::Function) F(x) = f(x...) return F.(points(grid)) end
