Mercurial > repos > public > sbplib_julia
comparison plotDerivative2d.jl @ 59:60d575e4a2d8
Merge with latest changes
author | Vidar Stiernström <vidar.stiernstrom@it.uu.se> |
---|---|
date | Wed, 16 Jan 2019 12:40:20 +0100 |
parents | 4300a3fbd818 |
children | 27a8d3021a1c 81d9510cb2d0 |
comparison
equal
deleted
inserted
replaced
58:f3ea15c8ebb6 | 59:60d575e4a2d8 |
---|---|
1 g = sbp.grid.EquidistantGrid((100,75),((0, 0), (2pi, 3/2*pi))) | 1 g = sbp.Grid.EquidistantGrid((100,75),((0, 0), (2pi, 3/2*pi))) |
2 op = sbp.readOperator("d2_4th.txt","h_4th.txt") | 2 op = sbp.readOperator("d2_4th.txt","h_4th.txt") |
3 Laplace = sbp.Laplace2D(g,1,op) | 3 Laplace = sbp.Laplace2D(g,1,op) |
4 | 4 |
5 init(x,y) = sin(x) + cos(y) | 5 init(x,y) = sin(x) + cos(y) |
6 v = sbp.grid.evalOn(g,init) | 6 v = sbp.Grid.evalOn(g,init) |
7 | 7 |
8 u = zeros(length(v)) | 8 u = zeros(length(v)) |
9 | 9 |
10 sbp.apply!(Laplace,u,v) | 10 sbp.apply!(Laplace,u,v) |
11 | 11 |
12 @show u | 12 @show u |
13 @show u'*u | 13 @show u'*u |
14 | 14 |
15 sbp.grid.plotgridfunction(g,u) | 15 sbp.Grid.plotgridfunction(g,u) |
16 | 16 |