Skip to content

Commit

Permalink
Add a test
Browse files Browse the repository at this point in the history
Add a test to compare outer signatures for the jacobian
  • Loading branch information
hwyschka committed Sep 27, 2024
1 parent d3a31a4 commit aeb3245
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions test/mesh_test.jl
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,34 @@ function test_mesh_fallbacks()
return true
end

function test_mesh_jacobians()
mesh = import_mesh("test_line_v4.msh")
el = 1
j1,_ = jacobian(mesh, el)
j2,_ = jacobian(mesh, mesh.Elements[el])
j3,_ = jacobian(mesh.Nodes[mesh.Elements[el]])
(j1 != j2) && return false
(j2 != j3) && return false

mesh = import_mesh("test_square_v4.msh")
el = mesh.nelems
j1,_ = jacobian(mesh, el)
j2,_ = jacobian(mesh, mesh.Elements[el])
j3,_ = jacobian(mesh.Nodes[mesh.Elements[el]])
(j1 != j2) && return false
(j2 != j3) && return false

mesh = import_mesh("test_cube_v4.msh")
el = 1
j1,_ = jacobian(mesh, el)
j2,_ = jacobian(mesh, mesh.Elements[el])
j3,_ = jacobian(mesh.Nodes[mesh.Elements[el]])
(j1 != j2) && return false
(j2 != j3) && return false

return true
end

function test_mesh_regions()
mesh = unit_square(3)

Expand Down Expand Up @@ -186,5 +214,6 @@ end
@test test_mesh("test_square")
@test test_mesh("test_cube")
@test test_mesh_fallbacks()
@test test_mesh_jacobians()
@test test_mesh_regions()
@test test_mesh_quality()

0 comments on commit aeb3245

Please sign in to comment.