view plotDerivative.jl @ 389:0433ab553d13 refactor/sbp_operators_tests/collect_and_compare

Rewrite l2 norm comparison to use the norm key word of isapprox
author Jonatan Werpers <jonatan@werpers.com>
date Thu, 01 Oct 2020 08:23:22 +0200
parents 8d505e9bc715
children
line wrap: on
line source

g = sbp.Grid.EquidistantGrid((200,), (0.0,), (2pi,))
op =sbp.readOperator("d2_4th.txt","h_4th.txt")
Laplace = sbp.Laplace(g,1.0,op)

init(x) = cos(x)
v = sbp.Grid.evalOn(g,init)
u = zeros(length(v))

sbp.apply!(Laplace,u,v)

@show u
sbp.Grid.plotgridfunction(g,u)