Mercurial > repos > public > sbplib_julia
diff 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 |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Grids/src/AbstractGrid.jl Wed Jun 26 15:07:47 2019 +0200 @@ -0,0 +1,24 @@ +""" + AbstractGrid + +Should implement + dimension(grid::AbstractGrid) + points(grid::AbstractGrid) + +""" +abstract type AbstractGrid end + +function dimension end +function points end +export dimension, points + +""" + evalOn(g::AbstractGrid, f::Function) + +Evaluate function f on the grid g +""" +function evalOn(g::AbstractGrid, f::Function) + F(x) = f(x...) + return F.(points(g)) +end +export evalOn