Ferrite.jl
Ferrite.jl copied to clipboard
Revive mixed dimensional relations in topology
The initial version of our topology was able to handle mixed dimensional constraints, but it was removed to obtain type stability in https://github.com/Ferrite-FEM/Ferrite.jl/pull/753 which made the topology construction a bit faster . The idea is for the recovery of this feature basically 6 additional collections for neighborhoods:
- 3D -> 2D
- 2D -> 3D
- 3D -> 1D
- 1D -> 3D
- 2D -> 1D
- 1D -> 2D And to have queries by co-dimension which directly works on these arrays. This should be enough for type stability.
I think with the new face and edge API we can query mixed-dimensional relations in a type stable way with the queries on FaceIndex and EdgeIndex.
Minimal test:
using Ferrite
cells = [
Hexahedron((1, 2, 3, 4, 5, 6, 7, 8)),
Quadrilateral((3, 2, 9, 10)),
]
nodes = [Node(coord) for coord in zeros(Vec{3,Float64}, 10)]
grid = Grid(cells, nodes)
topo = ExclusiveTopology(grid)
@assert any(.!isempty.(topo.edge_edge_neighbor))