Ferrite.jl icon indicating copy to clipboard operation
Ferrite.jl copied to clipboard

Use sorted OrderedSet in FieldHandler

Open fredrikekre opened this issue 1 year ago • 2 comments

This changes FieldHandler.cellset to be a sorted OrderedSet instead of a Set. This ensures that loops over sub-domains are done in ascending cell order.

Since e.g. cells, node coordinates, and dofs are stored in ascending cell order this gives a significant performance boost to loops over sub-domains, i.e. assembly-style loops. In particular, this removes the performance gap between MixedDofHandler and DofHandler in the create_sparsity_pattern benchmark in #629.

This is a minimal/initial step towards #625 that can be done before the DofHandler merge and rework of FieldHandler/SubDofHandler.

fredrikekre avatar Mar 29 '23 11:03 fredrikekre