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

Restrict to set() of unique elements in build_optimized_tables #627

Merged
merged 3 commits into from
Nov 13, 2023

Conversation

conpierce8
Copy link
Contributor

Description of the issue

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.

@garth-wells garth-wells added this pull request to the merge queue Nov 13, 2023
Merged via the queue into FEniCS:main with commit dfc6a7c Nov 13, 2023
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants