diff 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 diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/laplace_benchmark.m	Wed Jan 19 13:15:45 2022 +0100
@@ -0,0 +1,14 @@
+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)
\ No newline at end of file