comparison src/Grids/grid.jl @ 1133:a8c8517a310f feature/boundary_conditions

Merge with default
author Vidar Stiernström <vidar.stiernstrom@it.uu.se>
date Wed, 05 Oct 2022 22:05:23 +0200
parents dfbd62c7eb09
children 5f677cd6f0b6
comparison
equal deleted inserted replaced
1132:302d36b5ba8e 1133:a8c8517a310f
1 """ 1 """
2 Grid 2 Grid
3 3
4 Should implement 4 Should implement
5 dim(grid::Grid) 5 Base.ndims(grid::Grid)
6 points(grid::Grid) 6 points(grid::Grid)
7 7
8 """ 8 """
9 abstract type Grid end 9 abstract type Grid end
10 function dim end # TODO: Rename to Base.ndims instead? That's the name used for arrays.
11 function points end 10 function points end
12 11
13 """ 12 """
14 dims(grid::Grid) 13 dims(grid::Grid)
15 14
16 A range containing the dimensions of `grid` 15 A range containing the dimensions of `grid`
17 """ 16 """
18 dims(grid::Grid) = 1:dim(grid) 17 dims(grid::Grid) = 1:ndims(grid)
19 18
20 """ 19 """
21 evalOn(grid::Grid, f::Function) 20 evalOn(grid::Grid, f::Function)
22 21
23 Evaluate function `f` on `grid` 22 Evaluate function `f` on `grid`