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

Re-name overloaded create_form function #3003

Merged
merged 4 commits into from
Jan 30, 2024
Merged

Conversation

garth-wells
Copy link
Member

@garth-wells garth-wells commented Jan 20, 2024

We have three create_form overloaded functions. Two take form coefficients and constants that are associated with a name (string). This allows coefficients to be set by the name used in a UFL file. One create_form takes coefficients and constants that are in the required order.

The problem with this overloading is when a form has no coefficients or constants and one pass empty initializer lists ({}), which is the simplest syntax, the compiler cannot resolve the overload.

This change re-names the create_form function that requires data in the correct order to create_form_factory. There are no changes top C++ demos or tests, and no changes to Python.

@garth-wells garth-wells added enhancement New feature or request housekeeping Tidying and style improvements labels Jan 20, 2024
@garth-wells garth-wells changed the title Rename overloaded create_form function Re-name overloaded create_form function Jan 20, 2024
Copy link
Contributor

@chrisrichardson chrisrichardson left a comment

Choose a reason for hiding this comment

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

This has long been a problem. Good to fix.

@garth-wells garth-wells added this pull request to the merge queue Jan 30, 2024
Merged via the queue into main with commit f0054ad Jan 30, 2024
19 checks passed
@garth-wells garth-wells deleted the garth/create-form-resolve branch January 30, 2024 12:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request housekeeping Tidying and style improvements
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants