mirror of
https://github.com/JuliaFEM/JuliaFEM.jl.git
synced 2026-09-22 02:40:51 +00:00
feat(io): add Abaqus keyword registration system
New 24-line keyword registration system: - register_abaqus_keyword(): register keywords for section parsing - is_abaqus_keyword_registered(): check if keyword is registered - Global registry for ABAQUS .inp file keywords - Required by parse_model.jl for section parsing Provides keyword registration infrastructure for AbaqusReader module.
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
# This file is a part of JuliaFEM.
|
||||
# License is MIT: see https://github.com/JuliaFEM/AbaqusReader.jl/blob/master/LICENSE
|
||||
|
||||
global __register__ = Set{String}()
|
||||
|
||||
"""
|
||||
register_abaqus_keyword(keyword::String)
|
||||
|
||||
Add ABAQUS keyword `s` to register. That is, after registration every time
|
||||
keyword show up in `.inp` file a new section is started
|
||||
"""
|
||||
function register_abaqus_keyword(keyword::String)
|
||||
push!(__register__, keyword)
|
||||
return Type{Val{Symbol(keyword)}}
|
||||
end
|
||||
|
||||
"""
|
||||
is_abaqus_keyword_registered(keyword::String)
|
||||
|
||||
Return true/false is ABAQUS keyword registered.
|
||||
"""
|
||||
function is_abaqus_keyword_registered(keyword::String)
|
||||
return keyword in __register__
|
||||
end
|
||||
Reference in New Issue
Block a user