view benchmarkTest.jl @ 390:074862bcd626 patch_based_test

Close branch
author Jonatan Werpers <jonatan@werpers.com>
date Thu, 01 Oct 2020 08:28:03 +0200
parents 34fd86e9d0b9
children
line wrap: on
line source

using BenchmarkTools
using Profile
using ProfileView
m = 1000;
n = 450;
g = sbp.Grid.EquidistantGrid((m,n), (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(eltype(v),length(v))

sbp.apply!(Laplace,u,v)

#@time sbp.apply!(Laplace,u,v)

@benchmark sbp.apply!(Laplace,u,v)