view plotDerivative2d.jl @ 55:c62ea0112d4d

Add abstract types for Closure and Penalty
author Ylva Rydin <ylva.rydin@telia.com>
date Tue, 15 Jan 2019 10:25:56 +0100
parents 4300a3fbd818
children 27a8d3021a1c 81d9510cb2d0
line wrap: on
line source

g = sbp.Grid.EquidistantGrid((100,75),((0, 0), (2pi, 3/2*pi)))
op = sbp.readOperator("d2_4th.txt","h_4th.txt")
Laplace = sbp.Laplace2D(g,1,op)

init(x,y) = sin(x) + cos(y)
v = sbp.Grid.evalOn(g,init)

u = zeros(length(v))

sbp.apply!(Laplace,u,v)

@show u
@show u'*u

sbp.Grid.plotgridfunction(g,u)