Reading Code Aster med mesh properly

- MED file actually supports multiple element sets or node sets for
  single element/node. This is now implemented.
- Minor cleanup of code, etc..
- Fixes issue #111.
This commit is contained in:
Jukka Aho
2017-05-30 06:26:12 +03:00
parent 1f7b53400e
commit 139ef1a9f1
3 changed files with 101 additions and 50 deletions
+19
View File
@@ -135,3 +135,22 @@ end
@test isapprox(temp[15], 1.0)
@test isapprox(temp[95], 2.0)
end
using JuliaFEM.Preprocess: MEDFile, get_element_sets
@testset "test read element sets from med file, issue #111" begin
meshfile = joinpath(datadir, "hexmeshOverlappingGroups.med")
med = MEDFile(meshfile)
element_sets = get_element_sets(med, "Mesh_1")
@test element_sets[-10] == ["halfhex", "mosthex"]
@test element_sets[-11] == ["halfhex"]
end
using JuliaFEM.Preprocess: aster_read_mesh
@testset "test read overlapping ets, issue #111" begin
mesh_file = joinpath(datadir, "hexmeshOverlappingGroups.med")
mesh = aster_read_mesh(mesh_file, "Mesh_1")
@test length(mesh.element_sets[:mosthex]) == 273
@test length(mesh.element_sets[:halfhex]) == 147
end
Binary file not shown.