view AbstractGrid.jl @ 127:f01b70b81e95 cell_based_test

Change Type of dClosure and dClosure to stencil. Add apply_e and Apply_d
author Ylva Rydin <ylva.rydin@telia.com>
date Thu, 07 Feb 2019 16:34:55 +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