view sbpPlot.jl @ 1346:d2ffb412a0be feature/variable_derivatives

Pad closure stencils with zero rows to ensure that SecondDerivativeVarible can infer the size of the closure stencils
author Vidar Stiernström <vidar.stiernstrom@it.uu.se>
date Wed, 03 May 2023 08:51:29 +0200
parents d61bfc8cf6a5
children
line wrap: on
line source

include("sbp.jl")
using Makie
import .sbp.Grid
function plotgridfunction(grid::sbp.Grid.EquidistantGrid, gridfunction::AbstractArray)
    if sbp.Grid.dimension(grid) == 1
        plot(sbp.Grid.pointsalongdim(grid,1), gridfunction)
    elseif sbp.Grid.dimension(grid) == 2
        scene = surface(sbp.Grid.pointsalongdim(grid,1),sbp.Grid.pointsalongdim(grid,2), gridfunction)
    else
        error(string("Plot not implemented for dimension ", string(dimension(grid))))
    end
end