view plotDerivative.jl @ 53:8c6db1f6d8e0

Save plot to file when calling plotgridfunction, until figuring out how to set up an interactive gui backend for matplotlib in julia.
author Vidar Stiernström <vidar.stiernstrom@it.uu.se>
date Mon, 14 Jan 2019 11:30:36 +0100
parents 614b56a017b9
children 4300a3fbd818
line wrap: on
line source

g = sbp.grid.EquidistantGrid(200,(0, 2pi))
op =sbp.readOperator("d2_4th.txt","h_4th.txt")
Laplace = sbp.Laplace1D(g,1,op)

init(x) = sin(x)
v = sbp.Grid.evalOn(g,init)
u = zeros(length(v))

sbp.apply!(Laplace,u,v)

@show u
sbp.grid.plotgridfunction(g,u)