view AbstractGrid.jl @ 165:9fc9167e9a4c boundary_conditions

Factor out function for geting the region of an index
author Jonatan Werpers <jonatan@werpers.com>
date Tue, 21 May 2019 11:40:21 +0200
parents 631eb9b35d72
children
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