Mercurial > repos > public > sbplib_julia
comparison Grids/src/AbstractGrid.jl @ 231:fbabfd4e8f20
Merge in boundary_conditions
author | Jonatan Werpers <jonatan@werpers.com> |
---|---|
date | Wed, 26 Jun 2019 15:07:47 +0200 |
parents | b3506cfbb9d8 |
children |
comparison
equal
deleted
inserted
replaced
144:ce56727e4232 | 231:fbabfd4e8f20 |
---|---|
1 """ | |
2 AbstractGrid | |
3 | |
4 Should implement | |
5 dimension(grid::AbstractGrid) | |
6 points(grid::AbstractGrid) | |
7 | |
8 """ | |
9 abstract type AbstractGrid end | |
10 | |
11 function dimension end | |
12 function points end | |
13 export dimension, points | |
14 | |
15 """ | |
16 evalOn(g::AbstractGrid, f::Function) | |
17 | |
18 Evaluate function f on the grid g | |
19 """ | |
20 function evalOn(g::AbstractGrid, f::Function) | |
21 F(x) = f(x...) | |
22 return F.(points(g)) | |
23 end | |
24 export evalOn |