view AbstractGrid.jl @ 91:c0f33eccd527 cell_based_test

Create types StencilIndex, LowerClosureIndex, UpperClosureIndex and InteriorIndex. First attempt at seperating out interior and closure indices from. Not fully implemented.
author Vidar Stiernström <vidar.stiernstrom@it.uu.se>
date Tue, 29 Jan 2019 14:32:28 +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