From 08cd31fc6858dcd774d6a4e2fcb743bf1b3ccfa9 Mon Sep 17 00:00:00 2001 From: termi-official Date: Fri, 5 May 2023 15:36:15 +0200 Subject: [PATCH] Add regression test for 1D topology --- test/test_grid_dofhandler_vtk.jl | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/test/test_grid_dofhandler_vtk.jl b/test/test_grid_dofhandler_vtk.jl index 79abe65a89..68fa4299d0 100644 --- a/test/test_grid_dofhandler_vtk.jl +++ b/test/test_grid_dofhandler_vtk.jl @@ -214,6 +214,18 @@ end end @testset "Grid topology" begin +# +# (1) (2) (3) (4) +# +---+---+---+ +# + linegrid = generate_grid(Line,(3,)) + linetopo = ExclusiveTopology(linegrid) + @test linetopo.vertex_neighbor[1,2] == Ferrite.EntityNeighborhood(VertexIndex(2,1)) + @test linetopo.vertex_neighbor[2,1] == Ferrite.EntityNeighborhood(VertexIndex(1,2)) + @test linetopo.vertex_neighbor[2,2] == Ferrite.EntityNeighborhood(VertexIndex(3,1)) + @test linetopo.vertex_neighbor[3,1] == Ferrite.EntityNeighborhood(VertexIndex(2,2)) + @test length(linetopo.face_skeleton) == 4 + # (11) # (10)+-----+-----+(12) # | 5 | 6 |