view plotDerivative2d.jl @ 877:dd2ab001a7b6 feature/equidistant_grid/refine

Implement refine function, move exports to the top of the file, change location of constuctors. The constructors were changed have only one inner constructor and simpler outer constructors.
author Jonatan Werpers <jonatan@werpers.com>
date Mon, 14 Feb 2022 09:39:58 +0100
parents d61bfc8cf6a5
children
line wrap: on
line source

include("sbpPlot.jl")

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 = zero(v)

sbp.apply!(Laplace,u,v)

#@show u
#@show u'*u

plotgridfunction(g,u)