Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Kam/caseinsensitive #9

Merged
merged 3 commits into from
Apr 5, 2022
Merged

Kam/caseinsensitive #9

merged 3 commits into from
Apr 5, 2022

Conversation

KnutAM
Copy link
Member

@KnutAM KnutAM commented Apr 5, 2022

No description provided.

@KnutAM KnutAM requested a review from lijas April 5, 2022 15:12
@KnutAM
Copy link
Member Author

KnutAM commented Apr 5, 2022

According to the manual, the entire input file is (mostly) case insensitive.
For now, the set names are kept case-sensitive in the sense that the case that is in the input file is preserved, which I think makes sense.
This PR does not make the element codes case insensitive, this could of course be done but is a bit more effort so unless that's an issue at some point, then I suggest keeping that as it is right now....

Copy link
Collaborator

@lijas lijas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This works for my file at least.

DEBUG_PARSE && println("Reading elements with elset")
read_abaqus_elements!(f, topology_vectors, element_number_vectors, m.captures[1], m.captures[2], element_sets)
elseif ((m = match(r"\*Element, type=(.*)", header)) !== nothing)
elseif ((m = match(r"\*Element, type=(.*)"i, header)) !== nothing)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does the i do?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It makes the regular expressions case insensitive, see end of this section: https://docs.julialang.org/en/v1/manual/strings/#man-regex-literals

@codecov-commenter
Copy link

Codecov Report

Merging #9 (4d51c03) into main (957e486) will decrease coverage by 0.38%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main       #9      +/-   ##
==========================================
- Coverage   94.52%   94.14%   -0.39%     
==========================================
  Files           6        6              
  Lines         274      256      -18     
==========================================
- Hits          259      241      -18     
  Misses         15       15              
Impacted Files Coverage Δ
src/abaqusreader.jl 91.52% <100.00%> (-0.54%) ⬇️
src/FerriteMeshParser.jl 89.18% <0.00%> (-1.06%) ⬇️
src/gridcreator.jl 97.50% <0.00%> (-0.18%) ⬇️
src/rawmesh.jl 100.00% <0.00%> (ø)
src/elements.jl 100.00% <0.00%> (ø)
src/reading_utils.jl 100.00% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 957e486...4d51c03. Read the comment docs.

@KnutAM KnutAM merged commit afa2a02 into main Apr 5, 2022
@KnutAM KnutAM deleted the kam/caseinsensitive branch April 5, 2022 16:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants