Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

perf_laplace_sparse_matvec doesn't seem to do any matvecs #238

Open
KristofferC opened this issue Nov 1, 2018 · 0 comments
Open

perf_laplace_sparse_matvec doesn't seem to do any matvecs #238

KristofferC opened this issue Nov 1, 2018 · 0 comments

Comments

@KristofferC
Copy link
Contributor

KristofferC commented Nov 1, 2018

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant