Skip to content

Commit

Permalink
add new function abaqus_read_mesh
Browse files Browse the repository at this point in the history
  • Loading branch information
ahojukka5 committed Jul 19, 2017
1 parent b8d9166 commit 61d52f7
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
11 changes: 11 additions & 0 deletions src/parse_mesh.jl
Expand Up @@ -258,3 +258,14 @@ function parse_abaqus(fid::IOStream)
end
return model
end

"""
abaqus_read_mesh(fn::String)
Read ABAQUS mesh from file `fn`. Returns a dict with elements, nodes,
element sets, node sets and other topologically imporant things, but
not the actual model with boundary conditions, load steps and so on.
"""
function abaqus_read_mesh(fn::String)
return open(parse_abaqus, fn)
end
2 changes: 1 addition & 1 deletion test/test_parse_mesh.jl
Expand Up @@ -65,7 +65,7 @@ end

@testset "parse abaqus .inp created using hypermesh" begin
fn = joinpath(datadir, "hypermesh_model.inp")
mesh = open(parse_abaqus, fn)
mesh = abaqus_read_mesh(fn)
@test length(mesh["nodes"]) == 2
end

Expand Down

0 comments on commit 61d52f7

Please sign in to comment.