Ferrite-FEM/Ferrite.jl

`allocate_matrix` with only a topology gives a bad error message

Open

#1,029 opened on Jul 29, 2024

View on GitHub
 (0 comments) (0 reactions) (0 assignees)Julia (109 forks)github user discovery
enhancementgood first issue

Repository metrics

Stars
 (439 stars)
PR merge metrics
 (PR metrics pending)

Description

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

const dh = DofHandler(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)

allocate_matrix(dh; topology)

# ERROR: TypeError: in keyword argument interface_coupling, expected AbstractMatrix{Bool}, got a value of type Nothing
# Stacktrace:
#  [1] add_sparsity_entries!(sp::SparsityPattern, dh::DofHandler{…}, ch::Nothing; keep_constrained::Bool, coupling::Nothing, interface_coupling::Nothing, topology::ExclusiveTopology)

Contributor guide