Mercurial > repos > public > sbplib_julia
view plotDerivative.jl @ 86:34fd86e9d0b9 patch_based_test
Change benchmarkTest from function to script since @benchmark does not work within functions
author | Vidar Stiernström <vidar.stiernstrom@it.uu.se> |
---|---|
date | Fri, 25 Jan 2019 10:10:30 +0100 |
parents | 81d9510cb2d0 |
children | 8d505e9bc715 |
line wrap: on
line source
g = sbp.Grid.EquidistantGrid((200,), (0.0,), (2pi,)) op =sbp.readOperator("d2_4th.txt","h_4th.txt") Laplace = sbp.Laplace(g,1.0,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)