Mercurial > repos > public > sbplib_julia
comparison plotDerivative2d.jl @ 152:f54dd4408fa7 boundary_conditions
Merge with default
author | Jonatan Werpers <jonatan@werpers.com> |
---|---|
date | Mon, 15 Apr 2019 16:15:04 +0200 |
parents | d61bfc8cf6a5 |
children |
comparison
equal
deleted
inserted
replaced
145:e0c8f5cf3a3f | 152:f54dd4408fa7 |
---|---|
1 include("sbpPlot.jl") | |
2 | |
1 g = sbp.Grid.EquidistantGrid((100,75), (0.0, 0.0), (2pi, 3/2*pi)) | 3 g = sbp.Grid.EquidistantGrid((100,75), (0.0, 0.0), (2pi, 3/2*pi)) |
2 op = sbp.readOperator("d2_4th.txt","h_4th.txt") | 4 op = sbp.readOperator("d2_4th.txt","h_4th.txt") |
3 Laplace = sbp.Laplace(g, 1.0, op) | 5 Laplace = sbp.Laplace(g, 1.0, op) |
4 | 6 |
5 init(x,y) = sin(x) + cos(y) | 7 init(x,y) = sin(x) + cos(y) |
6 v = sbp.Grid.evalOn(g,init) | 8 v = sbp.Grid.evalOn(g,init) |
7 | 9 u = zero(v) |
8 u = zeros(length(v)) | |
9 | 10 |
10 sbp.apply!(Laplace,u,v) | 11 sbp.apply!(Laplace,u,v) |
11 | 12 |
12 #@show u | 13 #@show u |
13 #@show u'*u | 14 #@show u'*u |
14 | 15 |
15 sbp.Grid.plotgridfunction(g,u) | 16 plotgridfunction(g,u) |
16 |