Calls to ufl.algorithms.sort_elements should be made with a set() to remove repeated entries from the elements list. This prevents ufl.utils.sorting.topological_sorting from performing unnecessary work.
Description of changes
This pull request updates build_optimized_tables with a call to set() to remove repeated entries from the elements list before calling sort_elements. This is consistent with the usage at https://github.com/FEniCS/ffcx/blob/main/ffcx/analysis.py#L99.
Description of the issue
Calls to
ufl.algorithms.sort_elements
should be made with aset()
to remove repeated entries from the elements list. This preventsufl.utils.sorting.topological_sorting
from performing unnecessary work.Description of changes
This pull request updates
build_optimized_tables
with a call toset()
to remove repeated entries from the elements list before callingsort_elements
. This is consistent with the usage at https://github.com/FEniCS/ffcx/blob/main/ffcx/analysis.py#L99.