Mercurial > repos > public > sbplib_julia
comparison src/Grids/AbstractGrid.jl @ 1115:6530fceef37c feature/grids
Rename dimension to dim
author | Vidar Stiernström <vidar.stiernstrom@it.uu.se> |
---|---|
date | Fri, 15 Jul 2022 09:41:58 +0200 |
parents | fc57804c9bf4 |
children |
comparison
equal
deleted
inserted
replaced
1114:fc57804c9bf4 | 1115:6530fceef37c |
---|---|
1 """ | 1 """ |
2 AbstractGrid | 2 AbstractGrid |
3 | 3 |
4 Should implement | 4 Should implement |
5 dimension(grid::AbstractGrid) | 5 dim(grid::AbstractGrid) |
6 points(grid::AbstractGrid) | 6 points(grid::AbstractGrid) |
7 | 7 |
8 """ | 8 """ |
9 abstract type AbstractGrid end | 9 abstract type AbstractGrid end |
10 export AbstractGrid | 10 export AbstractGrid |
11 function dimension end | 11 function dim end # TODO: Rename to Base.ndims instead? That's the name used for arrays. |
12 function points end | 12 function points end |
13 export dimension, points | 13 export dim, points |
14 | 14 |
15 """ | 15 """ |
16 evalOn(g::AbstractGrid, f::Function) | 16 evalOn(g::AbstractGrid, f::Function) |
17 | 17 |
18 Evaluate function f on the grid g | 18 Evaluate function f on the grid g |
27 """ | 27 """ |
28 dims(g::AbstractGrid) | 28 dims(g::AbstractGrid) |
29 | 29 |
30 A range containing the dimensions of the grid | 30 A range containing the dimensions of the grid |
31 """ | 31 """ |
32 dims(grid::AbstractGrid) = 1:dimension(grid) | 32 dims(grid::AbstractGrid) = 1:dim(grid) |
33 export dims | 33 export dims |