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

Sparsity pattern entries for interface coupling is slow #993

Open
fredrikekre opened this issue Jun 27, 2024 · 1 comment
Open

Sparsity pattern entries for interface coupling is slow #993

fredrikekre opened this issue Jun 27, 2024 · 1 comment

Comments

@fredrikekre
Copy link
Member

fredrikekre commented Jun 27, 2024

For example:

using Ferrite

const n = 20

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

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)

# Just couple q-q over the interface
const interface_coupling = [
    false false false
    false false false
    false false true
]

@time create_sparsity_pattern(dh)
@time create_sparsity_pattern(dh; topology = top, cross_coupling = interface_coupling)

Gives

  0.708471 seconds (3.04 k allocations: 3.653 GiB, 13.00% gc time, 2.40% compilation time)
 16.754851 seconds (217.19 k allocations: 4.485 GiB, 1.05% gc time, 0.03% compilation time)

(Also happens with #888).

@KristofferC
Copy link
Collaborator

Unclear if #1028 is enough to close this.

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

No branches or pull requests

2 participants