view Grids/src/AbstractGrid.jl @ 277:21e5c1dd6794 boundary_conditions

Add getindex-function for region indices. Update LazyArray tests. NOTE: Not sure if this is the way to go.
author Vidar Stiernström <vidar.stiernstrom@it.uu.se>
date Mon, 06 Jan 2020 12:08:00 +0100
parents b3506cfbb9d8
children
line wrap: on
line source

"""
     AbstractGrid

Should implement
    dimension(grid::AbstractGrid)
    points(grid::AbstractGrid)

"""
abstract type AbstractGrid end

function dimension end
function points end
export dimension, points

"""
    evalOn(g::AbstractGrid, f::Function)

Evaluate function f on the grid g
"""
function evalOn(g::AbstractGrid, f::Function)
    F(x) = f(x...)
    return F.(points(g))
end
export evalOn