mirror of
https://github.com/JuliaFEM/JuliaFEM.jl.git
synced 2026-09-22 10:48:32 +00:00
Improving test coverage: test_preprocess.jl
This commit is contained in:
@@ -19,3 +19,15 @@ using JuliaFEM.Testing
|
||||
@test mesh.elements[1] == [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
|
||||
end
|
||||
|
||||
@testset "add_nodes! and add_elements!" begin
|
||||
mesh = Mesh()
|
||||
dic = Dict(1 => [1.,1.,1.], 2 => [2.,2.,2])
|
||||
add_nodes!(mesh, dic)
|
||||
@test mesh.nodes == dic
|
||||
|
||||
vec = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
|
||||
add_elements!(mesh,Dict(1=>(:Tet10,vec),
|
||||
11=>(:Tet10,vec)))
|
||||
@test mesh.elements[1] == vec
|
||||
@test mesh.elements[11] == vec
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user