view Grids/src/AbstractGrid.jl @ 211:1ad91e11b1f4 package_refactor

Move DiffOps and Grids into packages
author Jonatan Werpers <jonatan@werpers.com>
date Wed, 26 Jun 2019 10:44:20 +0200
parents AbstractGrid.jl@631eb9b35d72
children aa17d4d9d09e
line wrap: on
line source

abstract type AbstractGrid end

function dimension(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