|
236 | 236 | @test getfacetset(grid, "test_boundary_facetset") == Ferrite.create_boundaryfacetset(grid, topology, filter_function) |
237 | 237 | end |
238 | 238 |
|
239 | | - @testset "mixed grid" begin |
| 239 | + @testset "mixed grid 3D" begin |
240 | 240 | nodes = reshape([Node(Vec(x, y, z)) for x in -1:1, y in -1:1, z in 0:1], :) |
241 | 241 | for (shape1, shape2) in ((Hexahedron, Wedge), (Wedge, Hexahedron)) |
242 | 242 | grid = Grid([generate_cell1(shape1), generate_cell2(shape2)], nodes) |
|
245 | 245 | @test getfacetset(grid, "boundary") == boundary_facets(shape1, shape2) |
246 | 246 | end |
247 | 247 | end |
| 248 | + @testset "mixed grid 2D" begin |
| 249 | + nodes = [Node((-1.0, 0.0)), Node((0.0, 0.0)), Node((1.0, 0.0)), Node((-1.0, 1.0)), Node((0.0, 1.0))] |
| 250 | + cells = [ |
| 251 | + Quadrilateral((1, 2, 5, 4)), |
| 252 | + Triangle((3, 5, 2)), |
| 253 | + ] |
| 254 | + grid = Grid(cells, nodes) |
| 255 | + topology = ExclusiveTopology(grid) |
| 256 | + addboundaryfacetset!(grid, topology, "boundary", _ -> true) |
| 257 | + @test getfacetset(grid, "boundary") == Set([FacetIndex(1, 1), FacetIndex(1, 3), FacetIndex(1, 4), FacetIndex(2, 1), FacetIndex(2, 3)]) |
| 258 | + end |
248 | 259 | end |
0 commit comments