Ferrite.jl
Ferrite.jl copied to clipboard
Use sorted OrderedSet in FieldHandler
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
.