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

Create a BitSet of FieldHandler.cellset in loops #656

Merged
merged 1 commit into from
Mar 30, 2023
Merged

Conversation

fredrikekre
Copy link
Member

This patch creates a BitSet of FieldHandler.cellset in loops, in particular in close!(::DofHandler) and
create_sparsity_pattern(::DofHandler). Since BitSets are sorted this ensures that these loops are done in ascending cell order, which gives a performance boost due to better memory locality.

This is an even smaller change than #654 (and #625) which should be completely non-breaking since the type of FieldHandler.cellset is not changed. Larger refactoring, such as using BitSet or OrderedSet will be done in the FieldHandler/SubDofHandler` rework.

This patch creates a `BitSet` of `FieldHandler.cellset` in loops, in
particular in `close!(::DofHandler)` and
`create_sparsity_pattern(::DofHandler)`. Since `BitSet`s are sorted this
ensures that these loops are done in ascending cell order, which gives a
performance boost due to better memory locality.

This is an even smaller change than #654 (and #625) which should be
completely non-breaking since the type of `FieldHandler.cellset` is not
changed. Larger refactoring, such as using `BitSet` or `OrderedSet` will
be done in the `FieldHandler/`SubDofHandler` rework.
@codecov-commenter
Copy link

codecov-commenter commented Mar 30, 2023

Codecov Report

Patch coverage: 97.50% and no project coverage change.

Comparison is base (59c440b) 92.97% compared to head (f2c8550) 92.97%.

📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #656   +/-   ##
=======================================
  Coverage   92.97%   92.97%           
=======================================
  Files          30       30           
  Lines        4484     4484           
=======================================
  Hits         4169     4169           
  Misses        315      315           
Impacted Files Coverage Δ
src/Dofs/DofHandler.jl 84.23% <ø> (-2.25%) ⬇️
src/Ferrite.jl 100.00% <ø> (ø)
src/Dofs/MixedDofHandler.jl 91.36% <97.29%> (+0.87%) ⬆️
src/Dofs/sparsity_pattern.jl 99.27% <100.00%> (ø)
src/Export/VTK.jl 90.16% <100.00%> (+0.33%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@fredrikekre fredrikekre merged commit b019eea into master Mar 30, 2023
@fredrikekre fredrikekre deleted the fe/bitset-v2 branch March 30, 2023 12:58
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.

2 participants