Mercurial > repos > public > sbplib_julia
comparison plotDerivative.jl @ 54:4300a3fbd818
switch grid to Grid in diffOp
author | Ylva Rydin <ylva.rydin@telia.com> |
---|---|
date | Mon, 14 Jan 2019 16:30:52 +0100 |
parents | 614b56a017b9 |
children | 27a8d3021a1c 81d9510cb2d0 |
comparison
equal
deleted
inserted
replaced
53:8c6db1f6d8e0 | 54:4300a3fbd818 |
---|---|
1 g = sbp.grid.EquidistantGrid(200,(0, 2pi)) | 1 g = sbp.Grid.EquidistantGrid(200,(0, 2pi)) |
2 op =sbp.readOperator("d2_4th.txt","h_4th.txt") | 2 op =sbp.readOperator("d2_4th.txt","h_4th.txt") |
3 Laplace = sbp.Laplace1D(g,1,op) | 3 Laplace = sbp.Laplace1D(g,1,op) |
4 | 4 |
5 init(x) = sin(x) | 5 init(x) = sin(x) |
6 v = sbp.Grid.evalOn(g,init) | 6 v = sbp.Grid.evalOn(g,init) |
7 u = zeros(length(v)) | 7 u = zeros(length(v)) |
8 | 8 |
9 sbp.apply!(Laplace,u,v) | 9 sbp.apply!(Laplace,u,v) |
10 | 10 |
11 @show u | 11 @show u |
12 sbp.grid.plotgridfunction(g,u) | 12 sbp.Grid.plotgridfunction(g,u) |