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

Remove switch/case from generated code #591

Merged
merged 19 commits into from
Aug 15, 2023
Merged

Conversation

chrisrichardson
Copy link
Contributor

This removes the function interfaces in ufcx for entity_dofs and form integrals, which are replaced with static data.

@coveralls
Copy link

coveralls commented Aug 13, 2023

Coverage Status

coverage: 79.127% (-0.3%) from 79.387% when pulling e265aa9 on chris/remove-switch-case into a6c7572 on main.


default_integral = form0.integrals(module.lib.exterior_facet)[0]
default_integral = form0.form_integrals[integral_offsets[ex]]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This here is implicitly tied to the ordering of the enum in DOLFINx, which I'm not sure is a good idea. See: #589 (comment)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The order is explicitly defined in ufcx.h

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is still an issue for whenever we generate the offsets (as that is based on strings in a for-loop, not the enum).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have annotated the point where this happens in ffcx.

@chrisrichardson chrisrichardson merged commit 5b3dbec into main Aug 15, 2023
9 checks passed
@chrisrichardson chrisrichardson deleted the chris/remove-switch-case branch August 15, 2023 14:35
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.

3 participants