Mercurial > repos > public > sbplib_julia
diff AbstractGrid.jl @ 51:614b56a017b9
Split grid.jl into AbstractGrid.jl and EquidistantGrid.jl
author | Vidar Stiernström <vidar.stiernstrom@it.uu.se> |
---|---|
date | Fri, 11 Jan 2019 11:55:13 +0100 |
parents | |
children | 631eb9b35d72 |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/AbstractGrid.jl Fri Jan 11 11:55:13 2019 +0100 @@ -0,0 +1,19 @@ +abstract type AbstractGrid end + +function numberOfDimensions(grid::AbstractGrid) + error("Not implemented for abstact type AbstractGrid") +end + +function numberOfPoints(grid::AbstractGrid) + error("Not implemented for abstact type AbstractGrid") +end + +function points(grid::AbstractGrid) + error("Not implemented for abstact type AbstractGrid") +end + +# Evaluate function f on the grid g +function evalOn(g::AbstractGrid, f::Function) + F(x) = f(x...) + return F.(points(g)) +end