view laplace_benchmark.m @ 873:9929c99754fb laplace_benchmarks

Add some benchmarks using the Laplace Operator Set
author Vidar Stiernström <vidar.stiernstrom@it.uu.se>
date Wed, 19 Jan 2022 13:15:45 +0100
parents
children
line wrap: on
line source

m = 4001;
ops = sbp.D2Standard(m,{0,1},4);
D2 = ops.D2;
u = linspace(0,1,m)';
f = zeros(size(u));

nsample = 10000;
ts = zeros(nsample,1);

for i = 1:nsample
    tic; f = D2*u; t = toc;
    ts(i) = t;
end
min(ts)