Skip to content

Commit

Permalink
Added verbose option
Browse files Browse the repository at this point in the history
  • Loading branch information
JTHesse committed Jan 11, 2024
1 parent d8e42f8 commit 10c0c58
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
3 changes: 2 additions & 1 deletion Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,12 @@ authors = ["Jukka Aho <[email protected]>"]
version = "0.2.7"

[deps]
Logging = "56ddb016-857b-54e1-b83d-db4d58db5568"
Nullables = "4d1e1d77-625e-5b40-9113-a560ec7a8ecd"

[compat]
julia = "1"
Nullables = "1"
julia = "1"

[extras]
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
Expand Down
7 changes: 6 additions & 1 deletion src/parse_mesh.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
# License is MIT: see https://github.com/JuliaFEM/AbaqusReader.jl/blob/master/LICENSE

import Base.parse
using Logging

# Define element type and number of nodes in element
element_has_nodes(::Type{Val{:C3D4}}) = 4
Expand Down Expand Up @@ -296,6 +297,10 @@ 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)
function abaqus_read_mesh(fn::String; kwargs...)
verbose = get(kwargs, :verbose, true)
if !verbose
Logging.disable_logging(Logging.Error)
end
return open(parse_abaqus, fn)
end

0 comments on commit 10c0c58

Please sign in to comment.