annotate plotDerivative.jl @ 46:50c6c252d954

Fix issue in plotgridfunction in 2d. Remove 3d case. Will be added later
author Vidar Stiernström <vidar.stiernstrom@it.uu.se>
date Thu, 10 Jan 2019 17:39:42 +0100
parents 56722ba36604
children 614b56a017b9
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
46
50c6c252d954 Fix issue in plotgridfunction in 2d. Remove 3d case. Will be added later
Vidar Stiernström <vidar.stiernstrom@it.uu.se>
parents: 45
diff changeset
1 g = sbp.grid.EquidistantGrid(200,(0, 2pi))
45
56722ba36604 ass script that plots the derivative
Ylva Rydin <ylva.rydin@telia.com>
parents:
diff changeset
2 op =sbp.readOperator("d2_4th.txt","h_4th.txt")
56722ba36604 ass script that plots the derivative
Ylva Rydin <ylva.rydin@telia.com>
parents:
diff changeset
3 Laplace = sbp.Laplace1D(g,1,op)
56722ba36604 ass script that plots the derivative
Ylva Rydin <ylva.rydin@telia.com>
parents:
diff changeset
4
56722ba36604 ass script that plots the derivative
Ylva Rydin <ylva.rydin@telia.com>
parents:
diff changeset
5 init(x) = sin(x)
56722ba36604 ass script that plots the derivative
Ylva Rydin <ylva.rydin@telia.com>
parents:
diff changeset
6 v = sbp.grid.evalOn(g,init)
56722ba36604 ass script that plots the derivative
Ylva Rydin <ylva.rydin@telia.com>
parents:
diff changeset
7 u = zeros(length(v))
56722ba36604 ass script that plots the derivative
Ylva Rydin <ylva.rydin@telia.com>
parents:
diff changeset
8
56722ba36604 ass script that plots the derivative
Ylva Rydin <ylva.rydin@telia.com>
parents:
diff changeset
9 sbp.apply!(Laplace,u,v)
56722ba36604 ass script that plots the derivative
Ylva Rydin <ylva.rydin@telia.com>
parents:
diff changeset
10
56722ba36604 ass script that plots the derivative
Ylva Rydin <ylva.rydin@telia.com>
parents:
diff changeset
11 @show u
56722ba36604 ass script that plots the derivative
Ylva Rydin <ylva.rydin@telia.com>
parents:
diff changeset
12 sbp.grid.plotgridfunction(g,u)