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

allocate_matrix is 2x slower than the old create_sparsity_pattern #1030

Open
KristofferC opened this issue Jul 30, 2024 · 0 comments
Open

allocate_matrix is 2x slower than the old create_sparsity_pattern #1030

KristofferC opened this issue Jul 30, 2024 · 0 comments

Comments

@KristofferC
Copy link
Collaborator

KristofferC commented Jul 30, 2024

using Ferrite

const n = 20

const grid = generate_grid(Hexahedron, (n, n, n))

const dh = DofHandler(grid)
add!(dh, :u, Lagrange{RefHexahedron, 2}()^3)
add!(dh, :p, Lagrange{RefHexahedron, 1}())
add!(dh, :q, DiscontinuousLagrange{RefHexahedron, 1}())
close!(dh)

# On cf97ee510936259a22ab0e9dee0e423f918112e6
@time create_sparsity_pattern(dh)
  1.229940 seconds (19 allocations: 2.109 GiB, 5.58% gc time)

# On master
@time allocate_matrix(dh)
  2.563724 seconds (1.21 k allocations: 1.767 GiB, 9.39% gc time)
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