diff plotDerivative.jl @ 45:56722ba36604

ass script that plots the derivative
author Ylva Rydin <ylva.rydin@telia.com>
date Thu, 10 Jan 2019 16:51:52 +0100
parents
children 50c6c252d954
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/plotDerivative.jl	Thu Jan 10 16:51:52 2019 +0100
@@ -0,0 +1,13 @@
+g = sbp.grid.EquidistantGrid(200,(0, 1))
+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)
+