view plotDerivative2d.jl @ 76:81d9510cb2d0

Make Laplace take dimension as a parameter
author Jonatan Werpers <jonatan@werpers.com>
date Thu, 24 Jan 2019 09:24:21 +0100
parents 4300a3fbd818
children 8d505e9bc715
line wrap: on
line source

g = sbp.Grid.EquidistantGrid((100,75), (0.0, 0.0), (2pi, 3/2*pi))
op = sbp.readOperator("d2_4th.txt","h_4th.txt")
Laplace = sbp.Laplace(g, 1.0, 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)