Files
JuliaFEM.jl/test/test_mesh_coloring.jl
T

20 lines
591 B
Julia
Raw Normal View History

2018-11-08 14:28:20 -05:00
using JuliaFEM, LinearAlgebra, Test
datadir = first(splitext(basename(@__FILE__)))
@testset "Test that mesh coloring provides a good coloring"
fn = joinpath(datadir, "cube_tet4.inp")
mesh = JuliaFEM.Mesh(open(parse_abaqus, fn))
2018-11-19 07:44:56 -05:00
coloring = JuliaFEM.create_coloring(mesh)
for colors in coloring
2018-11-08 14:28:20 -05:00
for ele_i in colors
for ele_j in colors
if ele_i == ele_j
continue
end
@test intersect(Set(mesh.elements[ele_i]), Set(mesh.elements[ele_j])) |> isempty
end
end
end
end