try catch to ignore *ELSET creation from existing sets

This commit is contained in:
Tero Frondelius
2016-11-17 21:35:40 +02:00
parent b7f3900c03
commit 53a7d665c5
2 changed files with 10 additions and 1 deletions
+7 -1
View File
@@ -145,7 +145,13 @@ function parse_section(model, lines, key, idx_start, idx_end, ::Union{Type{Val{:
if !(empty_or_comment_line(line))
m = matchall(r"[0-9]+", line)
set_ids = map(s -> parse(Int, s), m)
push!(data, set_ids...)
try
push!(data, set_ids...)
catch err
if isa(err, MethodError)
warn("Problems with element set creation")
end
end
end
end
end
+3
View File
@@ -3,3 +3,6 @@
1, 2.448719E+00,-5.781690E+01,-5.904056E+00
2, 1.812015E+00,-6.871083E+01, 9.743510E+00
**
*ELSET, ELSET=EALL
conrod,
**