|
|
|
function laplace_sparse_matvec(n1, n2, n3) |
|
I_n1 = sparse(1.0I, n1, n1) |
|
I_n2 = sparse(1.0I, n2, n2) |
|
I_n3 = sparse(1.0I, n3, n3) |
|
D1 = kron(I_n3, kron(I_n2, ddx_spdiags(n1))) |
|
D2 = kron(I_n3, kron(ddx_spdiags(n2), I_n1)) |
|
D3 = kron(ddx_spdiags(n3), kron(I_n2, I_n1)) |
|
D = [D1 D2 D3] # divergence from faces to cell-centers |
|
return D*D' |
|
end |
It is just benchmarking the setup of the sparse matrix (effectively testing sparse matmat)
BaseBenchmarks.jl/src/problem/Laplacian.jl
Lines 41 to 51 in 9306a27
It is just benchmarking the setup of the sparse matrix (effectively testing sparse matmat)