view AbstractGrid.jl @ 53:8c6db1f6d8e0

Save plot to file when calling plotgridfunction, until figuring out how to set up an interactive gui backend for matplotlib in julia.
author Vidar Stiernström <vidar.stiernstrom@it.uu.se>
date Mon, 14 Jan 2019 11:30:36 +0100
parents 614b56a017b9
children 631eb9b35d72
line wrap: on
line source

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