@@ -32,6 +32,9 @@ element_has_type(::Type{Val{:T2D2}}) = :Seg2
3232element_has_nodes (:: Type{Val{:T3D2}} ) = 2
3333element_has_type (:: Type{Val{:T3D2}} ) = :Seg2
3434
35+ element_has_nodes (:: Type{Val{:B33}} ) = 2
36+ element_has_type (:: Type{Val{:B33}} ) = :Seg2
37+
3538""" Checks for a comment or empty line
3639
3740Function return true, if line starts with comment character "**"
7376"""
7477function add_set! (model, definition, model_key, abaqus_key, ids)
7578 has_set_def = parse_definition (definition)
76- if length (has_set_def) != 0
79+ if haskey (has_set_def, " elset " )
7780 set_name = has_set_def[abaqus_key]
7881 @info (" Adding $abaqus_key : $set_name " )
7982 model[model_key][set_name] = ids
@@ -133,11 +136,14 @@ If elset definition exists, also adds the set to model.
133136function parse_section (model, lines, :: Symbol , idx_start, idx_end, :: Type{Val{:ELEMENT}} )
134137 ids = Integer[]
135138 definition = lines[idx_start]
136- element_type = regex_match (r" TYPE=([\w\-\_ ]+)" , definition, 1 )
139+ regexp = r" TYPE=([\w\-\_ ]+)" i
140+ m = match (regexp, definition)
141+ m == nothing && error (" Could not match regexp $regexp to line $definition " )
142+ element_type = m[1 ]
137143 eltype_sym = Symbol (element_type)
138144 eltype_nodes = element_has_nodes (Val{eltype_sym})
139145 element_type = element_has_type (Val{eltype_sym})
140- @info (" Parsing elements. Type: $(element_type) " )
146+ @info (" Parsing elements. Type: $(m[ 1 ]) . Topology: $( element_type)" )
141147 list_iterator = consumeList (lines, idx_start+ 1 , idx_end)
142148 line = list_iterator ()
143149 while line != nothing
0 commit comments